User groups #55
Workflow file for this run
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
# Github Action definition for running tox across the supported python | |
# versions. Intended to be triggered on push to master and on filing | |
# of a pull_request, when those pushes hit something that impacts the | |
# running of the tests. | |
name: Tox | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
ignore-paths: | |
- 'docs/**' | |
- 'examples/**' | |
- 'tools/**' | |
paths: | |
- 'setup.cfg' | |
- '**/*.py' | |
- '**/*.pyi' | |
- '.github/workflows/tox.yml' | |
pull_request: | |
ignore-paths: | |
- 'docs/**' | |
- 'examples/**' | |
- 'tools/**' | |
paths: | |
- 'setup.cfg' | |
- '**/*.py' | |
- '**/*.pyi' | |
- '.github/workflows/tox.yml' | |
jobs: | |
pre-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libkrb5-dev | |
pip install tox tox-gh-actions | |
- name: Run Flake8 | |
run: | | |
tox -e flake8 | |
- name: Run MyPy | |
run: | | |
tox -e mypy | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
- '3.11' | |
needs: | |
- pre-tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get install libkrb5-dev | |
pip install tox tox-gh-actions | |
- name: Running tox | |
run: | | |
tox | |
- name: Store coverage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: coverage-data | |
path: .coverage.py* | |
coverage: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
needs: | |
- tests | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
- name: Install dependencies | |
run: | | |
pip install coverage | |
- name: Fetch coverage results | |
uses: actions/download-artifact@v3 | |
with: | |
name: coverage-data | |
- name: Combine and report coverage | |
run: | | |
coverage combine | |
coverage lcov | |
coverage report | |
- name: Upload to Coveralls | |
uses: coverallsapp/github-action@v2 | |
with: | |
file: coverage.lcov | |
allow-empty: true | |
fail-on-error: false | |
# The end. |