-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (47 loc) · 1.27 KB
/
Copy pathtest.yaml
File metadata and controls
48 lines (47 loc) · 1.27 KB
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
---
name: Test
on:
push:
branches:
- main
- develop
pull_request:
jobs:
test:
name: Test
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_DB: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 3
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3.0.2
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Upgrade pip
run: pip install --upgrade pip
- name: Install poetry # This is not ideal; should investigate available actions for installing/using poetry properly
run: pip install poetry
- run: poetry config virtualenvs.create false
- name: Install dependencies
run: poetry install --no-dev --no-ansi --no-interaction --no-root
- name: Run tests
env:
POSTGRES_DB_NAME: postgres
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB_HOST: localhost
POSTGRES_DB_PORT: 5432
run: python3 manage.py test