-
Notifications
You must be signed in to change notification settings - Fork 46
36 lines (31 loc) · 985 Bytes
/
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
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 and poetry
run: |
python -m pip install --upgrade pip
pip3 install cookiecutter==2.1.1 poetry==1.7.1
- name: Run tests
run: bash run_test.sh