-
Notifications
You must be signed in to change notification settings - Fork 48
40 lines (35 loc) · 1.03 KB
/
main.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
name: Run tests for Django-init
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: hello_world
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/hello_world
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
cache: "pip"
- name: Install cookiecutter
run: |
python -m pip install --upgrade pip
pip3 install cookiecutter==1.7.3
- name: Install poetry
run: |
pip3 install poetry==1.2.0
- name: Run tests
run: |
./run_test.sh