@@ -2,19 +2,17 @@ name: Run Checks
22
33on :
44 push :
5- branches : ["** "]
5+ branches : ["main "]
66 pull_request :
77 # The branches below must be a subset of the branches above
8- branches : [main]
9- schedule :
10- - cron : ' 0 23 * * 2'
8+ branches : ["main"]
119
1210jobs :
1311 test :
1412 strategy :
1513 matrix :
1614 python : [ 3.6, 3.7, 3.8, 3.9 ]
17- os : [ ubuntu-latest, macos-latest ]
15+ os : [ ubuntu-latest, macos-latest, windows-latest ]
1816 runs-on : ${{ matrix.os }}
1917
2018 steps :
@@ -29,20 +27,36 @@ jobs:
2927 path : .venv
3028 key : ${{ runner.os }}-${{ matrix.python }}-dependencies-${{ hashFiles('**/poetry.lock') }}
3129 restore-keys : |
32- ${{ runner.os }}-${{ matrix.python }}-dependencies-
30+ ${{ runner.os }}-${{ matrix.python }}-dependencies-v2
3331 - 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
3952
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
4255
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
4559
4660 - uses : codecov/codecov-action@v2
4761 with :
48- files : ./coverage.xml,./e2e-coverage.xml
62+ files : ./coverage.xml
0 commit comments