-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (45 loc) · 1.22 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Test
on:
push:
branches:
- master
- staging
pull_request:
branches:
- master
- staging
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: 2020123
POSTGRES_USER: github_actions
ports:
- 5432:5432
options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=5 --name postgres
redis:
image: redis
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 --name redis
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.8'
cache: 'pipenv'
- name: Set up pipenv
run: python -m pip install --upgrade pipenv wheel
- name: Install requirements
run: pipenv install --deploy --dev
- name: Move secrets
run: mv secrets.json.template tests/secrets.json
- name: Run tests
run: |
npm install
pipenv run ./manage.py collectstatic
pipenv run ./manage.py test