-
Notifications
You must be signed in to change notification settings - Fork 52
77 lines (57 loc) · 2.37 KB
/
main.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
69
70
71
72
73
74
75
76
77
---
name: CI
on:
push:
branches: ["develop", "main"]
pull_request:
branches: ["develop"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip poetry
poetry install
- name: Check the code formatting (black)
run: poetry run pre-commit run black --all-files
- name: Check the code formatting (flake8)
run: poetry run pre-commit run flake8 --all-files
- name: Check the order of your imports (isort)
run: poetry run pre-commit run isort --all-files
# - name: Check the static type (mypy)
# run: poetry run pre-commit run mypy --all-files
- name: Checks the style of the documentation (doc8)
run: poetry run pre-commit run doc8 --all-files
- name: Check the YAML syntax (check-yaml,yamllint)
run: |
poetry run pre-commit run check-yaml --all-files
poetry run pre-commit run yamllint --all-file
- name: Check the TOML syntax (check-toml)
run: poetry run pre-commit run check-toml --all-files
- name: Check whether files parse a valid Python (check-ast)
run: poetry run pre-commit run check-ast --all-files
- name: Check the docstring placement (check-docstring-first)
run: poetry run pre-commit run check-docstring-first --all-files
- name: Check for debugger imports and breakpoints (debug-statements)
run: poetry run pre-commit run debug-statements --all-files
- name: Check for end of files (end-of-file-fixer)
run: poetry run pre-commit run end-of-file-fixer --all-files
- name: Check for trailing whitespace (trailing-whitespace)
run: poetry run pre-commit run trailing-whitespace --all-files
- name: Run unit tests (pytest)
run: poetry run tox -e tests
# - name: Build the documentation (sphinx)
# run: poetry run tox -e docs
- name: Update coverage to Codecov
uses: codecov/codecov-action@v1