Fix broken CI workflow. #60
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@v4 | |
| with: { fetch-depth: 0 } # deep clone for setuptools-scm | |
| - uses: actions/setup-python@v5 | |
| 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 | |
| - name: Record the paths of wheel and source tarball distributions | |
| id: distribution-paths | |
| run: | | |
| echo "wheel=$(ls dist/*.whl)" >> $GITHUB_OUTPUT | |
| echo "tarball=$(ls dist/*.tar.gz)" >> $GITHUB_OUTPUT | |
| - name: Store the distribution files for use in other stages | |
| # `tests`, `pypi-publish`, and `docker-publish` will use the same | |
| # pre-built distributions, so we make sure to release the exact | |
| # same package that was tested | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: python-distribution-files | |
| path: dist/ | |
| retention-days: 1 | |
| - name: Keepalive Workflow | |
| uses: gautamkrishnar/keepalive-workflow@1.1.0 | |
| with: | |
| time_elapsed: 44 | |
| gh_token: ${{ secrets.GITHUB_TOKEN }} | |
| static_checks: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: { python-version: "3.11" } | |
| - name: Run static analysis and format checkers | |
| run: pipx run pre-commit run --all-files --show-diff-on-failure | |
| test: | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11"] | |
| platform: | |
| - ubuntu-latest | |
| - macos-latest | |
| env: | |
| OS: ${{ matrix.platform }} | |
| PYTHON: ${{ matrix.python }} | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: install pipenv | |
| run: pip install pipenv | |
| - name: install dependencies | |
| run: pipenv install --ignore-pipfile --dev --python ${{ matrix.python-version }} | |
| - name: pytest | |
| env: | |
| SYNAPSE_AUTH_TOKEN: ${{ secrets.SYNAPSE_AUTH_TOKEN }} | |
| run: | | |
| pipenv run pytest -m "not slow" |