-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (56 loc) · 2.08 KB
/
test-integration-webtest.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
name: Run integration tests - Webtests
on:
pull_request:
push:
branches: [main]
jobs:
build:
# Due to the cgroups 1 issue on the openconext container, we do not
# use the new ubuntu platform yet. As they started using cgroups v2
runs-on: ubuntu-latest
timeout-minutes: 30
env:
DOCKER_COMPOSE: docker compose -f docker-compose.yml -f docker-compose-ci.yml
DOCKER_COMPOSE_PHP: docker compose -f docker-compose.yml -f docker-compose-ci.yml exec -T spdashboard
DOCKER_RUN_SPD_AS_WWW: docker exec --user 33:33 spdashboard-spdashboard-1
steps:
- name: Check out the repo
uses: actions/checkout@v4
with:
path: spdashboard
- name: Checkout openconext-devconf
uses: actions/checkout@v4
with:
path: OpenConext-devconf
repository: OpenConext/OpenConext-devconf
- name: Bootstrap the openconext environment
working-directory: spdashboard
run: bash ../OpenConext-devconf/core/scripts/init.sh
- name: Start the docker images for testing
working-directory: spdashboard
run: ${DOCKER_COMPOSE} up -d
- name: Instantiate the env file
run: cp spdashboard/.env.dist spdashboard/.env
- name: Run composer
working-directory: spdashboard
run: |
${DOCKER_COMPOSE_PHP} /usr/bin/composer install -n --prefer-dist -o --ignore-platform-reqs
- name: Run yarn
working-directory: spdashboard
run: |
${DOCKER_COMPOSE_PHP} yarn install
- name: Create front end dependencies (yarn encore production)
working-directory: spdashboard
run: |
${DOCKER_COMPOSE_PHP} yarn run encore production
- name: Run CI tests
working-directory: spdashboard
run: |
${DOCKER_COMPOSE_PHP} sh -c 'composer webtest'
- name: Upload error screenshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: error-screenshots
path: spdashboard/var/error-screenshots
retention-days: 2