@@ -2,19 +2,17 @@ name: Run Checks
2
2
3
3
on :
4
4
push :
5
- branches : ["** "]
5
+ branches : ["main "]
6
6
pull_request :
7
7
# The branches below must be a subset of the branches above
8
- branches : [main]
9
- schedule :
10
- - cron : ' 0 23 * * 2'
8
+ branches : ["main"]
11
9
12
10
jobs :
13
11
test :
14
12
strategy :
15
13
matrix :
16
14
python : [ 3.6, 3.7, 3.8, 3.9 ]
17
- os : [ ubuntu-latest, macos-latest ]
15
+ os : [ ubuntu-latest, macos-latest, windows-latest ]
18
16
runs-on : ${{ matrix.os }}
19
17
20
18
steps :
@@ -29,20 +27,36 @@ jobs:
29
27
path : .venv
30
28
key : ${{ runner.os }}-${{ matrix.python }}-dependencies-${{ hashFiles('**/poetry.lock') }}
31
29
restore-keys : |
32
- ${{ runner.os }}-${{ matrix.python }}-dependencies-
30
+ ${{ runner.os }}-${{ matrix.python }}-dependencies-v2
33
31
- name : Install dependencies
34
- uses : triaxtec/github-actions/python/install-and-configure-poetry@main
35
- - name : Run Checks
36
- uses : triaxtec/github-actions/python/run-checks@main
37
- with :
38
- module : openapi_python_client
32
+ run : |
33
+ pip install poetry
34
+ poetry config virtualenvs.in-project true
35
+ poetry run python -m pip install --upgrade pip
36
+ poetry install
37
+
38
+ - name : Run Black
39
+ run : poetry run black . --check
40
+
41
+ - name : Run isort
42
+ run : poetry run isort . --check
43
+
44
+ - name : Run flake8
45
+ run : poetry run flake8 openapi_python_client
46
+
47
+ - name : Run safety
48
+ run : poetry export -f requirements.txt | poetry run safety check --bare --stdin
49
+
50
+ - name : Run mypy
51
+ run : poetry run mypy --show-error-codes openapi_python_client
39
52
40
- - name : End to End Tests
41
- run : poetry run pytest --cov=openapi_python_client end_to_end_tests
53
+ - name : Run pytest
54
+ run : poetry run pytest --cov=openapi_python_client --cov-report=term-missing tests end_to_end_tests/test_end_to_end.py
42
55
43
- - name : Generate E2E Coverage
44
- run : poetry run coverage xml -o e2e-coverage.xml
56
+ - name : Generate coverage report
57
+ shell : bash
58
+ run : poetry run coverage xml
45
59
46
60
- uses : codecov/codecov-action@v2
47
61
with :
48
- files : ./coverage.xml,./e2e-coverage.xml
62
+ files : ./coverage.xml
0 commit comments