@@ -23,39 +23,56 @@ permissions:
2323 contents : read
2424
2525jobs :
26- # TODO reactivate tests & debug test runs once publishing squared out
27- # tests:
28- # name: Unit tests
29-
30- # if: |
31- # github.event_name != 'pull_request' ||
32- # github.event.pull_request.author_association == 'COLLABORATOR' ||
33- # github.event.pull_request.author_association == 'MEMBER' ||
34- # github.event.pull_request.user.login == 'dependabot[bot]' ||
35- # contains(github.event.pull_request.labels.*.name, 'safe to test')
36-
37- # runs-on: ${{ matrix.os }}
38-
39- # strategy:
40- # fail-fast: false
41- # matrix:
42- # os: [ windows-latest, macos-latest, ubuntu-latest ]
43- # rust_version: [ stable, 1.76.0 ]
44-
45- # steps:
46- # - name: Checkout repository
47- # uses: actions/checkout@v4
48-
49- # - name: Set up Python
50- # uses: actions/setup-python@v5
51- # with:
52- # python-version: "3.10"
53- # cache: "pip"
54-
55- # - run: python -m pip install --upgrade pip
56- # - run: python -m pip install -r requirements.txt
57- # - run: python -m pip install pytest
58- # - run: pytest
26+ tests :
27+ name : Unit tests (developer setup)
28+
29+ if : |
30+ github.event_name != 'pull_request' ||
31+ github.event.pull_request.author_association == 'COLLABORATOR' ||
32+ github.event.pull_request.author_association == 'MEMBER' ||
33+ github.event.pull_request.user.login == 'dependabot[bot]' ||
34+ contains(github.event.pull_request.labels.*.name, 'safe to test')
35+
36+ runs-on : ${{ matrix.os }}
37+
38+ strategy :
39+ fail-fast : false
40+ matrix :
41+ os : [ windows-latest, macos-latest, ubuntu-latest ]
42+
43+ steps :
44+ - name : Checkout repository
45+ uses : actions/checkout@v4
46+
47+ - name : Set up Python
48+ uses : actions/setup-python@v5
49+ with :
50+ python-version : " 3.10"
51+ cache : " pip"
52+
53+ # - name: Upgrade pip
54+ # run: python -m pip install --upgrade pip
55+
56+ - name : Install project dependencies
57+ run : python -m pip install -r requirements.txt
58+
59+ - name : Prepare build directories
60+ run : |
61+ mkdir -p artifacts
62+ mkdir -p src/c2pa/libs
63+ rm -rf dist/* build/*
64+
65+ - name : Download native artifacts
66+ run : python3 scripts/download_artifacts.py c2pa-v0.55.0
67+
68+ - name : Install package in development mode
69+ run : pip install -e .
70+
71+ - name : Install pytest
72+ run : python -m pip install pytest
73+
74+ - name : Run tests
75+ run : python3 ./tests/test_unit_tests.py
5976
6077 linux :
6178 uses : ./.github/workflows/build-wheel.yml
0 commit comments