-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (30 loc) · 909 Bytes
/
pytest.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
# Runs the Pytest test suite when PRs are made against any branch
name: Run Pytest via Docker Compose on all PRs
on:
pull_request:
branches:
- "*"
push:
branches:
- main
- development
jobs:
build-and-run-pytest-suite-in-docker-compose:
runs-on: ubuntu-latest
steps:
- name: Checkout full code repo
uses: actions/checkout@v4
with:
fetch-depth: 0 # to allow git_context_processor.py to still work
- name: Create .env file from repo secrets
run: |
echo -n "${{ secrets.ENVIRONMENT }}" | base64 -d > envs/.env
- name: Install Docker Compose
run: |
sudo apt-get install -y docker-compose
- name: Build Docker images and run containers with compose
run: |
docker compose up -d
- name: Run tests
run: |
docker compose exec django pytest -v