forked from TreyWW/MyFinances
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (27 loc) · 942 Bytes
/
run_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
name: Backend Tests
on: [push, pull_request]
env:
DOCKER_COMPOSE_PATH: ./infrastructure/backend/docker-compose.ci.yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Set up environment variables
run: cp .env.github_actions .env
- name: Copy docker compose file
run: cp $DOCKER_COMPOSE_PATH ./docker-compose.yml
- name: Install Python dependencies
uses: py-actions/py-dependency-install@v4
with:
path: requirements.gh_actions.txt
- name: Build and run docker-compose.ci.yml
run: docker-compose up -d
- name: Run the test scripts
run: |
docker-compose exec -T myfinances_django ./infrastructure/backend/scripts/tests/views.sh