Skip to content

Commit e638503

Browse files
committed
Temporary add test.yml
1 parent eae0e42 commit e638503

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

.github/workflows/test.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Python application
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
services:
11+
postgres:
12+
image: postgres:latest
13+
env:
14+
POSTGRES_USER: postgres
15+
POSTGRES_PASSWORD: postgres
16+
POSTGRES_DB: github_actions
17+
ports:
18+
- 5432:5432
19+
# needed because the postgres container does not provide a healthcheck
20+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
21+
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Set up Python 3.9
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.9
28+
- name: Install dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install -r requirements.txt
32+
pip install pytest-django
33+
- name: Run migrations
34+
run: python manage.py migrate
35+
- name: Run tests
36+
run: py.test

0 commit comments

Comments
 (0)