name: Test "on": schedule: - cron: "0 11 * * 5" push: branches: - main - dev - deps pull_request: branches: - main jobs: Test: 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 - uses: actions/setup-python@v3 with: python-version: ${{ matrix.pyversion }} cache: pip cache-dependency-path: requirements/tests.txt - run: python -m pip install -U pip setuptools wheel tox - name: cache .hypothesis dir uses: actions/cache@v3 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 if: matrix.enable_coverage with: verbose: true fail_ci_if_error: false # https://github.com/codecov/codecov-action/issues/557