-
Notifications
You must be signed in to change notification settings - Fork 20
45 lines (38 loc) · 1.07 KB
/
docker-tests.yml
File metadata and controls
45 lines (38 loc) · 1.07 KB
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
name: Docker Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
permissions:
contents: read
jobs:
docker_tests:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Prepare test environment
run: docker compose up --no-start
- name: Start test
run: |
docker compose start
docker compose logs --follow sql_schema_compare_test
# Exit with the same exit code of the service
id=$(docker compose ps -a --format "{{.ID}}" sql_schema_compare_test || true)
if [ -z "$id" ]; then
echo "Unable to get id"
exit 1
fi
exitCode=$(docker inspect --format='{{.State.ExitCode}}' "$id" || true)
if [ -z "$exitCode" ]; then
echo "Unable to get exitCode"
exit 1
fi
exit $exitCode
- name: Display other services logs
if: always()
run: |
docker compose logs mssql
docker compose logs mssql_init