-
Notifications
You must be signed in to change notification settings - Fork 3
87 lines (75 loc) · 3.07 KB
/
run-integration-tests-postgresql.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# SPDX-FileCopyrightText: 2022 Alliander N.V.
#
# SPDX-License-Identifier: Apache-2.0
name: Run integration tests (PostgreSQL)
on:
push:
branches:
- '**'
pull_request:
branches:
- 'main'
jobs:
integration-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Docker Register
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Start containers
run: docker compose -f "compas/docker-compose-postgresql.yml" up -d --build
env:
COMPAS_HOSTNAME: compas-reverse-proxy-1
CONFIGURATION_LOCATION: /nginx.conf
- name: Wait until containers started
run: sh ./bin/docker-wait-on-containers.sh
- name: Created output directory (firefox)
run: mkdir -p target/firefox
- name: Execute integration tests (firefox)
# Using the Docker Image from ppodgorsek (https://github.com/ppodgorsek/docker-robot-framework)
# to run the Robot Framework Test Scripts.
# To connect with the Docker Compose and use http://compas-reverse-proxy-1/ as URL we are
# connecting to the same network "compas_default" that's started bij Docker Compose.
run: |
docker run --rm -e BROWSER=firefox \
-e ROBOT_OPTIONS="-v url:http://compas-reverse-proxy-1/" \
-v $(pwd)/target/firefox:/opt/robotframework/reports:Z \
-v $(pwd)/integration-testing:/opt/robotframework/tests:Z \
--user $(id -u):$(id -g) \
--network=compas_default \
ppodgorsek/robot-framework:latest
- name: Created output directory (chromium)
run: mkdir -p target/chromium
- name: Execute integration tests (chromium)
# Using the Docker Image from ppodgorsek (https://github.com/ppodgorsek/docker-robot-framework)
# to run the Robot Framework Test Scripts.
# To connect with the Docker Compose and use http://compas-reverse-proxy-1/ as URL we are
# connecting to the same network "compas_default" that's started bij Docker Compose.
run: |
docker run --rm -e BROWSER=chromium \
-e ROBOT_OPTIONS="-v url:http://compas-reverse-proxy-1/" \
-v $(pwd)/target/firefox:/opt/robotframework/reports:Z \
-v $(pwd)/integration-testing:/opt/robotframework/tests:Z \
--user $(id -u):$(id -g) \
--network=compas_default \
ppodgorsek/robot-framework:latest
- name: Archive Robot Framework Reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: robot-framework-reports
retention-days: 7
path: |
target/firefox/*.*
target/chromium/*.*
- name: Stop containers
if: always()
run: docker compose -f "compas/docker-compose-postgresql.yml" down -v