-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 922 Bytes
/
pytest.yml
File metadata and controls
40 lines (31 loc) · 922 Bytes
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
name: pytest
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
permissions:
contents: read
jobs:
pytest:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
environment:
name: development
steps:
- uses: actions/checkout@v3
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Make .env file
run: |
cp .env.example .env
- name: Build the containers & Start the containers
run: |
docker-compose -f docker-compose.yml --env-file .env up --build -d
- name: Test with pytest
run: |
docker-compose -f docker-compose.yml --env-file .env exec -T dev pytest
- name: Clean up
if: always()
run: |
docker-compose -f docker-compose.yml --env-file .env down