MNT: (deps): Bump actions/github-script from 6 to 7 #837
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: PyPI Tests | |
# We don't want pushes (or PRs) to gh-pages to kick anything off | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
# | |
# Run all tests on Linux using standard PyPI packages, including min and pre-releases | |
# | |
PyPITests: | |
name: ${{ matrix.python-version }} ${{ matrix.dep-versions }} ${{ matrix.no-extras }} | |
runs-on: ubuntu-20.04 | |
continue-on-error: ${{ matrix.dep-versions == 'Prerelease' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.7, 3.8, 3.9] | |
dep-versions: [requirements.txt] | |
no-extras: [''] | |
include: | |
- python-version: 3.7 | |
dep-versions: Minimum | |
no-extras: 'No Extras' | |
- python-version: 3.9 | |
dep-versions: requirements.txt | |
no-extras: 'No Extras' | |
- python-version: 3.9 | |
dep-versions: Prerelease | |
no-extras: '' | |
steps: | |
# We check out only a limited depth and then pull tags to save time | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 100 | |
- name: Get tags | |
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# This uses pip to find the right cache dir and then sets up caching for it | |
- name: Get pip cache dir | |
id: pip-cache | |
run: echo "::set-output name=dir::$(pip cache dir)" | |
- name: Setup caching | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.pip-cache.outputs.dir }} | |
key: pip-tests-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | |
restore-keys: | | |
pip-tests-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('ci/*') }} | |
pip-tests-${{ runner.os }}-${{ matrix.python-version }}- | |
pip-tests-${{ runner.os }}- | |
pip-tests- | |
- name: Add extras to requirements | |
if: ${{ matrix.no-extras != 'No Extras' }} | |
run: cat ci/extra_requirements.txt >> ci/test_requirements.txt | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip setuptools | |
python -m pip install -r ci/test_requirements.txt -c ci/${{ matrix.dep-versions }} | |
- name: Install | |
run: python -m pip install -c ci/${{ matrix.dep-versions }} . | |
- name: Run tests | |
run: | | |
python -m coverage run -p -m pytest tests | |
python -m coverage combine | |
python -m coverage report | |
python -m coverage xml | |
- name: Upload coverage | |
if: ${{ always() }} | |
uses: codecov/codecov-action@v3 | |
with: | |
name: pypi-${{ matrix.python-version }}-${{ matrix.dep-versions }}-${{ matrix.no-extras }}-${{ runner.os }} |