-
Notifications
You must be signed in to change notification settings - Fork 15
42 lines (36 loc) · 1010 Bytes
/
pr-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
name: Run tests on PR
permissions:
contents: read
on:
pull_request:
branches:
- main
- development
- hotfix
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
test:
if: github.event.pull_request.draft == false
name: Run tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Build container for tests
run: docker compose -f ./.ci/docker-compose.yml -p ci build
- name: Launch containers to run tests
id: vars
run: |
docker compose -f ./.ci/docker-compose.yml -p ci up -d sut
docker logs -f ci-sut-1
echo "sut_output=$(docker wait ci-sut-1)" >> $GITHUB_OUTPUT
- name: Check failure
run: |
if [ ${{ steps.vars.outputs.sut_output }} != 0 ]; then
echo ${{ steps.vars.outputs.sut_output }}
exit 1
fi