Skip to content

Commit fe2735c

Browse files
yeezy-na-izistolzor
authored andcommitted
Add test before release
1 parent afcba7d commit fe2735c

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

.github/workflows/release-ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,50 @@ on:
55
types: [ published ]
66

77
jobs:
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

0 commit comments

Comments
 (0)