-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (47 loc) · 1.57 KB
/
test_service_api.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
47
48
49
50
51
52
53
54
55
56
# See: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
name: 'Test Service: API Integration'
on:
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/test_service_api.yml'
- '.github/actions/build-service/action.yml'
- 'services/.env.example'
- 'services/121-service/**'
- 'services/mock-service/**'
- '!**.md'
push:
branches:
- 'release/*'
- 'hotfix/*'
paths:
- '.github/workflows/test_service_api.yml'
- '.github/actions/build-service/action.yml'
- 'services/.env.example'
- 'services/121-service/**'
- 'services/mock-service/**'
- '!**.md'
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Set ENV-variables for test-environment
run: |
cp ./services/.env.example services/.env
- name: Run Services with Docker
working-directory: ./services
run: |
docker --log-level 'warn' compose -f docker-compose.yml up -d --quiet-pull --wait --wait-timeout 300
- name: Check that no new migrations are necessary
working-directory: ./services
run: |
docker compose exec 121-service npm run migration:generate src/migration/irrelevant_file_name -- --check
- name: Run API tests with Jest
working-directory: ./services
run: |
docker compose exec 121-service npm run test:e2e:all
- name: Docker logs
if: always()
uses: jwalton/gh-docker-logs@v2