chore(deps): update tibdex/github-app-token action to v2 #593
This file contains 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: Test workflow | |
permissions: | |
checks: write | |
pull-requests: write | |
concurrency: | |
group: test-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [ master, main, release ] | |
pull_request: | |
branches: [ master, main, release ] | |
workflow_dispatch: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.9", "3.10"] | |
exclude: | |
# No numpy wheels yet: | |
- os: windows-latest | |
python-version: "3.10" | |
# Reincluded with more parameters below | |
- os: ubuntu-latest | |
python-version: "3.9" | |
include: | |
- python-version: 3.9 | |
os: ubuntu-20.04 | |
publish-results: true | |
tox-full-run: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
if: ${{ !matrix.tox-full-run }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry tox tox-gh-actions | |
poetry install --with test | |
- name: Test with tox | |
if: ${{ !matrix.tox-full-run }} | |
run: | |
poetry run tox -e test | |
- name: Install dependencies | |
if: ${{ matrix.tox-full-run }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry tox tox-gh-actions | |
poetry install --with test,dev,doc | |
- name: Test with tox | |
if: ${{ matrix.tox-full-run }} | |
run: | |
poetry run tox | |
- name: list files | |
if: ${{ always() }} | |
run: ls -l . | |
- name: Publish Test Results | |
if: ${{ matrix.publish-results && always() }} | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
with: | |
junit_files: pytest.xml | |
- uses: codecov/codecov-action@v4 | |
if: ${{ matrix.publish-results && always() }} | |
with: | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: coverage.xml | |
publish_dev_build: | |
# if test failed, we should not publish | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
poetry install | |
- name: list files | |
run: ls -l . | |
- name: Build wheels and source tarball | |
run: | | |
poetry version $(poetry version --short)-dev.$GITHUB_RUN_NUMBER | |
poetry version --short | |
poetry build | |
- name: publish to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
skip_existing: true | |
verbose: true |