name: Test "on": schedule: # Every Friday at noon - cron: "0 12 * * 5" push: branches: - main - dev - deps pull_request: branches: - main jobs: main: name: ${{ matrix.pyversion }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: # https://github.com/actions/setup-python/blob/main/docs/advanced-usage.md#available-versions-of-python-and-pypy - pyversion: "3.11" enable_coverage: true - pyversion: "3.10" - pyversion: "3.9" - pyversion: "3.8" - pyversion: "3.7" enable_coverage: true - pyversion: pypy-3.9 - pyversion: pypy-3.8 - pyversion: pypy-3.7 steps: - uses: actions/checkout@v3.1.0 - uses: actions/setup-python@v4.3.0 with: python-version: ${{ matrix.pyversion }} cache: pip cache-dependency-path: dev-deps/test.txt - run: python -m pip install -U pip setuptools wheel tox==4.0.5 - name: cache .hypothesis dir uses: actions/cache@v3.0.11 with: path: .hypothesis key: hypothesis|${{ runner.os }}|${{ matrix.pyversion }} - name: Configure pytest to enable coverage if: matrix.enable_coverage run: | echo PYTEST_ADDOPTS="${PYTEST_ADDOPTS} --cov=bidict --cov-config=.coveragerc --cov-report=xml" >> "${GITHUB_ENV}" echo TOX_TESTENV_PASSENV=PYTEST_ADDOPTS >> "${GITHUB_ENV}" - run: tox -e py - name: Upload coverage to Codecov # https://github.com/codecov/codecov-action uses: codecov/codecov-action@v3.1.1 if: matrix.enable_coverage with: verbose: true fail_ci_if_error: false # https://github.com/codecov/codecov-action/issues/557