-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (35 loc) · 1015 Bytes
/
tests.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
name: Django tests
on:
push:
branches:
- main
jobs:
test:
name: Run unit tests on Django
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Show GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
shell: bash
- name: Show user id
run: id
shell: bash
- run: cp env.SAMPLE .env
- run: cp docker-compose.dev.yml docker-compose.override.yml
- name: create app-data folder
run: mkdir -p app-data/media
- name: Set permissions
run: sudo chown -R 1000:1000 app-data
- run: docker compose build
- run: docker compose up -d
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres_password
POSTGRES_DB: postgres
POSTGRES_HOST: db
- name: Run API Tests
run: docker compose exec -T django python manage.py test api