[pre-commit.ci] pre-commit autoupdate (#313) #833
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: quality-check | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test-code: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
python-version: ["3.10", "3.11"] | |
defaults: | |
run: | |
shell: bash | |
runs-on: ${{ matrix.platform }} | |
timeout-minutes: 15 | |
env: | |
PLATFORM: ${{ matrix.platform }} | |
PYTHON_VERSION: ${{ matrix.python-version }} | |
PYTHONUTF8: 1 # https://peps.python.org/pep-0540/ | |
COLORTERM: truecolor | |
PIP_DISABLE_PIP_VERSION_CHECK: 1 | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Poetry | |
uses: snok/[email protected] | |
- name: Install Package | |
run: poetry install | |
- name: Run pre-commit checks | |
run: poetry run pre-commit run --all-files --show-diff-on-failure --color=always | |
- name: Make sure we can build the package | |
run: poetry build -vvv | |
- name: Test types | |
run: poetry run mypy | |
- name: Test code | |
run: poetry run pytest -v --cov --cov-report=xml --durations=20 | |
- name: Test docs | |
run: poetry run mkdocs build --clean --strict --verbose | |
- name: Upload coverage | |
uses: codecov/[email protected] | |
with: | |
env_vars: PLATFORM,PYTHON_VERSION | |
fail_ci_if_error: false | |
test-docker: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/[email protected] | |
with: | |
install: true | |
- name: Build Image | |
uses: docker/[email protected] | |
with: | |
file: ./docker/Dockerfile | |
pull: true | |
push: false |