Test #160
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 | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 0' # @weekly | |
jobs: | |
test: | |
name: Python ${{ matrix.python-version }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 15 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: [3.7, 3.8, 3.9, "3.10", 3.11] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install pip and tox | |
run: python -m pip install --upgrade pip tox | |
- name: Format Python version for tox | |
id: py_tox_version | |
uses: frabert/replace-string-action@v2.4 | |
with: | |
pattern: '(\d)\.(\d)' | |
string: ${{ matrix.python-version }} | |
replace-with: '$1$2' | |
- name: Run tox | |
env: | |
TOXENV: ${{ format('py{0}-{1}', steps.py_tox_version.outputs.replaced, runner.os) }} | |
run: tox --skip-missing-interpreters false | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3.1.4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
docs: | |
name: Build docs | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.x | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Install pip and tox | |
run: python -m pip install --upgrade pip tox | |
- name: Run tox | |
run: tox --skip-missing-interpreters false -e docs |