Skip to content

Add script for D2D with SCIO using docker container (#1912) #527

Add script for D2D with SCIO using docker container (#1912)

Add script for D2D with SCIO using docker container (#1912) #527

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-13
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: ikalnytskyi/action-setup-postgres@v7
id: postgres
with:
postgres-version: "14" # 13 is not supported.
database: ${{ env.POSTGRES_DB }}
username: ${{ env.POSTGRES_USER }}
password: ${{ env.POSTGRES_PASSWORD }}
port: 5432
- 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 }}