-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (65 loc) · 1.93 KB
/
quality-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
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/checkout@v3.5.3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4.6.1
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1.3.3
- 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/codecov-action@v3.1.4
with:
env_vars: PLATFORM,PYTHON_VERSION
fail_ci_if_error: false
test-docker:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3.5.3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2.7.0
with:
install: true
- name: Build Image
uses: docker/build-push-action@v4.1.1
with:
file: ./docker/Dockerfile
pull: true
push: false