File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 types : [ published ]
66
77jobs :
8+ test :
9+ name : ' Test before deploy'
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v2
13+
14+ - name : Set up Python 3.9
15+ uses : actions/setup-python@v2
16+ with :
17+ python-version : 3.9
18+
19+ - name : cache poetry install
20+ uses : actions/cache@v2
21+ with :
22+ path : ~/.local
23+ key : poetry-1.2.2-0
24+
25+ - uses : snok/install-poetry@v1
26+ with :
27+ version : 1.2.2
28+ virtualenvs-create : true
29+ virtualenvs-in-project : true
30+
31+ - name : cache deps
32+ id : cache-deps
33+ uses : actions/cache@v2
34+ with :
35+ path : .venv
36+ key : pydeps-${{ hashFiles('**/poetry.lock') }}
37+
38+ - run : poetry install --no-root
39+ if : steps.cache-deps.outputs.cache-hit != 'true'
40+
41+ - run : poetry run pip install setuptools
42+
43+ - name : Run tests
44+ run : poetry run python manage.py test
45+ env :
46+ DEBUG : True
47+
848 build :
949 name : ' Build & Publish'
1050 runs-on : ubuntu-latest
51+ needs : [ test ]
1152 steps :
1253 - name : " Checkout repository"
1354 uses : actions/checkout@v2
You can’t perform that action at this time.
0 commit comments