-
Notifications
You must be signed in to change notification settings - Fork 12
40 lines (38 loc) · 1.07 KB
/
runtests.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
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build_and_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run the containers
run: docker-compose -f ./docker/docker-compose.test.yml up -d phpreport-app api test_db
- name: Run flake8 check
run: docker exec -t phpreport-api tox -e flake8
- name: Run black check
run: docker exec -t phpreport-api tox -e black
- name: Run API tests
run: docker exec -t phpreport-api tox -e pytest
- name: Wait
run: sleep 15s
- name: Run php tests
run: docker exec -t phpreport-app ./vendor/bin/phpunit --testdox tests --verbose
test_frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install deps
run: npm install
- name: Run frontend tests
run: npm run test