Merge pull request #132 from julien6387/dev-0.18.7 #465
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: Run all tests | |
on: [push, pull_request] | |
jobs: | |
tests: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.6, 3.7, 3.8, 3.9, "3.10", 3.11, 3.12] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Show Python version | |
run: python -V | |
- name: Set TOXENV based on Python version | |
run: python -c "import sys; print(f'TOXENV=py{sys.version_info.major}{sys.version_info.minor}')" | tee -a $GITHUB_ENV | |
- name: Install dependencies | |
run: pip install virtualenv tox | |
- name: Run the unit tests | |
run: tox | |
coverage: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: pip install virtualenv tox | |
- name: Run unit test coverage | |
run: TOXENV=cover tox | |
- name: Coveralls | |
# does not work yet as pytest-cov does not provide Lcov files | |
# uses: coverallsapp/github-action@master | |
run: pip install coveralls && coveralls --service=github | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
docs: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: pip install virtualenv tox | |
- name: Build the docs | |
run: TOXENV=docs tox |