File tree Expand file tree Collapse file tree 5 files changed +72
-88
lines changed Expand file tree Collapse file tree 5 files changed +72
-88
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Pull Request
2+ on :
3+ pull_request :
4+
5+ jobs :
6+ test :
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+ - name : Setup Poetry
18+ uses : abatilo/actions-poetry@v2
19+
20+ - name : Cache Dependencies
21+ uses : actions/cache@v3
22+ id : cache
23+ with :
24+ path : .venv
25+ key : venv-${{ runner.os }}-${{ hashFiles('./poetry.lock') }}
26+
27+ - name : Install Dependencies if cache doesn't hit
28+ if : steps.cache.outputs.cache-hit != 'true'
29+ run : poetry install
30+
31+ - name : Run test
32+ run : poetry run invoke test
33+
34+ - name : Upload Code Coverage
35+ run : bash <(curl -s https://codecov.io/bash)
36+ env :
37+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
38+
39+ static-analysis :
40+ runs-on : ubuntu-latest
41+ steps :
42+ - uses : actions/checkout@v3
43+ with :
44+ fetch-depth : 0
45+ - name : Set up Python 3.9
46+ uses : actions/setup-python@v4
47+ with :
48+ python-version : 3.9
49+
50+ - name : Setup Poetry
51+ uses : abatilo/actions-poetry@v2
52+
53+ - name : Cache Dependencies
54+ uses : actions/cache@v3
55+ id : cache
56+ with :
57+ path : .venv
58+ key : venv-${{ runner.os }}-${{ hashFiles('./poetry.lock') }}
59+
60+ - name : Install Dependencies if cache doesn't hit
61+ if : steps.cache.outputs.cache-hit != 'true'
62+ run : poetry install
63+
64+ - name : Check Code Styles
65+ run : poetry run invoke check
Original file line number Diff line number Diff line change @@ -14,20 +14,18 @@ jobs:
1414 with :
1515 python-version : 3.9
1616
17- - uses : snok/install-poetry@v1.3.3
18- with :
19- virtualenvs-create : true
20- virtualenvs-in-project : true
17+ - name : Setup Poetry
18+ uses : abatilo/actions-poetry@v2
2119
2220 - name : Cache Dependencies
23- uses : actions/cache@v2
24- id : cache-dependencies
21+ uses : actions/cache@v3
22+ id : cache
2523 with :
2624 path : .venv
27- key : venv-${{ runner.os }}-${{ hashFiles('** /poetry.lock') }}
25+ key : venv-${{ runner.os }}-${{ hashFiles('. /poetry.lock') }}
2826
2927 - name : Install Dependencies if cache doesn't hit
30- if : steps.cache-dependencies .cache-hit != 'true'
28+ if : steps.cache.outputs .cache-hit != 'true'
3129 run : poetry install
3230
3331 - name : Publish to PyPI
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ def run(context: Context):
2626
2727@task
2828def test (context : Context ):
29- context .run ('pytest . --cov=. --cov-report=xml' , pty = True )
29+ context .run ('pytest . -s - -cov=. --cov-report=xml' , pty = True )
3030
3131
3232@task
You can’t perform that action at this time.
0 commit comments