-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (36 loc) · 1.22 KB
/
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
name: Tests
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
api-tests:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- name: Setup running platform stack
run: docker compose up --build -d
- name: Pause for stack to start
run: sleep 10
- name: Integration tests - API
run: docker run
--env CONF_DIR=/dp3/tests/test_config
--network container:dp3_api
dp3_interpreter python -m unittest discover -s tests/test_api -v
- name: Dump Logs on Failure
if: failure()
run: docker compose logs
- name: Check worker errors
run: docker compose logs worker | grep "WARNING\|ERROR\|exception" | grep -v "RabbitMQ\|it's\ OK\ now,\ we're\ successfully\ connected" || true
- name: Teardown platform stack
run: docker compose down
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Test
run: docker build -f docker/python/Dockerfile --target base -t dp3_interpreter .
- name: Test
run: docker run dp3_interpreter python -m unittest discover -s tests/test_common