File tree Expand file tree Collapse file tree 4 files changed +120
-0
lines changed
Expand file tree Collapse file tree 4 files changed +120
-0
lines changed Original file line number Diff line number Diff line change 1+ ## Context
2+ -
3+
4+ ## Changes
5+ -
Original file line number Diff line number Diff line change 1+ name : Check Code
2+ on :
3+ pull_request :
4+
5+ jobs :
6+ static-analysis :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v3
10+ with :
11+ fetch-depth : 0
12+ - name : Set up Python 3.9
13+ uses : actions/setup-python@v4
14+ with :
15+ python-version : 3.9
16+
17+ 18+ with :
19+ virtualenvs-create : true
20+ virtualenvs-in-project : true
21+
22+ - name : Cache Dependencies
23+ uses : actions/cache@v2
24+ id : cache-dependencies
25+ with :
26+ path : .venv
27+ key : venv-${{ runner.os }}-${{ hashFiles('./poetry.lock') }}
28+
29+ - name : Install Dependencies if cache doesn't hit
30+ if : steps.cache-dependencies.cache-hit != 'true'
31+ run : poetry install
32+
33+ - name : Check Code Styles
34+ run : poetry run invoke check-code-style
35+
36+ - name : Check Types
37+ run : poetry run invoke check-types
Original file line number Diff line number Diff line change 1+ name : Release Package to PyPI
2+ on :
3+ release :
4+ types : [created]
5+ jobs :
6+ release :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v3
10+ with :
11+ fetch-depth : 0
12+ - name : Set up Python 3.9
13+ uses : actions/setup-python@v4
14+ with :
15+ python-version : 3.9
16+
17+ 18+ with :
19+ virtualenvs-create : true
20+ virtualenvs-in-project : true
21+
22+ - name : Cache Dependencies
23+ uses : actions/cache@v2
24+ id : cache-dependencies
25+ with :
26+ path : .venv
27+ key : venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
28+
29+ - name : Install Dependencies if cache doesn't hit
30+ if : steps.cache-dependencies.cache-hit != 'true'
31+ run : poetry install
32+
33+ - name : Publish to PyPI
34+ run :
35+ poetry config http-basic.pypi ${{ secrets.PYPI_USERNAME }} ${{ secrets.PYPI_PASSWORD }};
36+ poetry run invoke release ${{ github.event.release.name }}
Original file line number Diff line number Diff line change 1+ name : Test
2+ on :
3+ push :
4+ branches :
5+ - master
6+ pull_request :
7+
8+ jobs :
9+ test :
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v3
13+ with :
14+ fetch-depth : 0
15+ - name : Set up Python 3.9
16+ uses : actions/setup-python@v4
17+ with :
18+ python-version : 3.9
19+
20+ 21+ with :
22+ virtualenvs-create : true
23+ virtualenvs-in-project : true
24+
25+ - name : Cache Dependencies
26+ uses : actions/cache@v2
27+ id : cache-dependencies
28+ with :
29+ path : .venv
30+ key : venv-${{ runner.os }}-${{ hashFiles('./poetry.lock') }}
31+
32+ - name : Install Dependencies if cache doesn't hit
33+ if : steps.cache-dependencies.cache-hit != 'true'
34+ run : poetry install
35+
36+ - name : Run test
37+ run : poetry run pytest --cov=. --cov-report=xml
38+
39+ - name : Upload Code Coverage
40+ run : bash <(curl -s https://codecov.io/bash)
41+ env :
42+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments