Skip to content

chore: upgrade Django and cryptography to latest version (#2150) #1059

chore: upgrade Django and cryptography to latest version (#2150)

chore: upgrade Django and cryptography to latest version (#2150) #1059

name: Run unit tests on macOS
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: read
env:
POSTGRES_DB: scancodeio
POSTGRES_USER: scancodeio
POSTGRES_PASSWORD: scancodeio
jobs:
run-unit-tests:
runs-on: macos-15
strategy:
matrix:
python-version: ["3.12", "3.13", "3.14"]
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false # do not keep the token around
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Set up PostgreSQL
uses: ikalnytskyi/action-setup-postgres@c4dda34aae1c821e3a771b68b73b13af3198a7ee # v8
with:
postgres-version: "17"
database: ${{ env.POSTGRES_DB }}
username: ${{ env.POSTGRES_USER }}
password: ${{ env.POSTGRES_PASSWORD }}
port: 5432
- name: Install libmagic
run: brew install libmagic
- name: Install Python dependencies
run: make dev envfile
- name: Run Django tests
run: .venv/bin/python manage.py test --verbosity=2 --noinput
env:
SCANCODEIO_DB_NAME: ${{ env.POSTGRES_DB }}
SCANCODEIO_DB_USER: ${{ env.POSTGRES_USER }}
SCANCODEIO_DB_PASSWORD: ${{ env.POSTGRES_PASSWORD }}