Fix broken CI workflow. #6
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Testing | |
| on: [pull_request] | |
| permissions: | |
| contents: read | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| wheel-path: ${{ steps.distribution-paths.outputs.wheel }} | |
| tarball-path: ${{ steps.distribution-paths.outputs.tarball }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: { fetch-depth: 0 } # deep clone for setuptools-scm | |
| - uses: actions/setup-python@v4 | |
| with: { python-version: "3.11" } | |
| - name: Run static analysis and format checkers | |
| run: pipx run pre-commit run --all-files --show-diff-on-failure | |
| - name: Install tox-gh plugin | |
| run: python -m pip install tox-gh>=1.2 | |
| - name: Build package distribution files | |
| run: tox -e clean,build | |
| test: | |
| needs: prepare | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| platform: | |
| - ubuntu-latest | |
| - macos-latest | |
| # TODO: Debug the Windows issues | |
| # - windows-latest | |
| env: | |
| OS: ${{ matrix.platform }} | |
| PYTHON: ${{ matrix.python }} | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - uses: actions/download-artifact@v3 | |
| with: { name: python-distribution-files, path: dist/ } | |
| - name: Install tox-gh plugin | |
| run: python -m pip install tox-gh>=1.2 | |
| - name: Setup test suite | |
| run: tox -vv --notest | |
| - name: Run tests | |
| env: | |
| SYNAPSE_AUTH_TOKEN: ${{ secrets.SYNAPSE_AUTH_TOKEN }} | |
| run: >- | |
| tox --installpkg '${{ needs.prepare.outputs.wheel-path }}' | |
| -- -rFEx --durations 10 --color yes | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| # CodeCov can be flaky, so this step is not required for success | |
| fail_ci_if_error: false | |
| files: coverage.xml | |
| # Using matrix pattern from `codecov/codecov-action` README: | |
| # https://github.com/codecov/codecov-action#example-workflowyml-with-codecov-action | |
| env_vars: OS,PYTHON | |
| verbose: true |