@@ -2,9 +2,9 @@ name: Run Checks
22
33on :
44 push :
5- branches : ["main"]
5+ branches : [ "main" ]
66 pull_request :
7- branches : ["main"]
7+ branches : [ "main" ]
88
99jobs :
1010 test :
@@ -14,50 +14,62 @@ jobs:
1414 os : [ ubuntu-latest, macos-latest, windows-latest ]
1515 runs-on : ${{ matrix.os }}
1616 steps :
17- - uses : actions/checkout@v2
18- - name : Set up Python
19- uses : actions/setup-python@v2
20- with :
21- python-version : ${{ matrix.python }}
22- - name : Cache dependencies
23- uses : actions/cache@v2
24- with :
25- path : .venv
26- key : ${{ runner.os }}-${{ matrix.python }}-dependencies-${{ hashFiles('**/poetry.lock') }}
27- restore-keys : |
28- ${{ runner.os }}-${{ matrix.python }}-dependencies
29- - name : Install dependencies
30- run : |
31- pip install poetry
32- python -m venv .venv
33- poetry run python -m pip install --upgrade pip
34- poetry install
35-
36- - name : Run Black
37- run : poetry run black . --check
38-
39- - name : Run isort
40- run : poetry run isort . --check
41-
42- - name : Run flake8
43- run : poetry run flake8 openapi_python_client
44-
45- - name : Run safety
46- run : poetry export -f requirements.txt | poetry run safety check --bare --stdin
47-
48- - name : Run mypy
49- run : poetry run mypy --show-error-codes openapi_python_client
50-
51- - name : Run pylint
52- run : poetry run pylint openapi_python_client
53-
54- - name : Run pytest
55- run : poetry run pytest --cov=openapi_python_client --cov-report=term-missing tests end_to_end_tests/test_end_to_end.py
56-
57- - name : Generate coverage report
58- shell : bash
59- run : poetry run coverage xml
60-
61- - uses : codecov/codecov-action@v2
62- with :
63- files : ./coverage.xml
17+ - uses : actions/checkout@v2
18+ - name : Set up Python
19+ uses : actions/setup-python@v2
20+ with :
21+ python-version : ${{ matrix.python }}
22+
23+ - name : Get Python Version
24+ id : get_python_version
25+ run : echo "::set-output name=python_version::$(python --version)"
26+
27+ - name : Cache dependencies
28+ uses : actions/cache@v2
29+ with :
30+ path : .venv
31+ key : ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies-${{ hashFiles('**/poetry.lock') }}
32+ restore-keys : |
33+ ${{ runner.os }}-${{ steps.get_python_version.outputs.python_version }}-dependencies
34+ - name : Install Poetry
35+ run : pip install poetry
36+
37+ - name : Create Virtual Environment
38+ run : python -m venv .venv
39+
40+ - name : Upgrade pip
41+ run : poetry run python -m pip install --upgrade pip
42+
43+ - name : Install Dependencies
44+ run : poetry install
45+
46+ - name : Run Black
47+ run : poetry run black . --check
48+
49+ - name : Run isort
50+ run : poetry run isort . --check
51+
52+ - name : Run flake8
53+ run : poetry run flake8 openapi_python_client
54+
55+ - name : Run safety
56+ run : poetry export -f requirements.txt | poetry run safety check --bare --stdin
57+
58+ - name : Run mypy
59+ run : poetry run mypy --show-error-codes openapi_python_client
60+
61+ - name : Run pylint
62+ run : poetry run pylint openapi_python_client
63+
64+ - name : Run pytest
65+ run : poetry run pytest --cov=openapi_python_client --cov-report=term-missing tests end_to_end_tests/test_end_to_end.py --basetemp=tests/tmp
66+ env :
67+ TASKIPY : true
68+
69+ - name : Generate coverage report
70+ shell : bash
71+ run : poetry run coverage xml
72+
73+ - uses : codecov/codecov-action@v2
74+ with :
75+ files : ./coverage.xml
0 commit comments