-
Notifications
You must be signed in to change notification settings - Fork 87
75 lines (62 loc) · 2.47 KB
/
e2e-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
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
name: Acme e2e Test CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Configure Node.js '18.x'
uses: actions/setup-node@v1
with:
node-version: '18.x'
- name: Prepare artifacts (e.g. extensions) for docker-compose stack
run: mvn --batch-mode -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -DskipTests verify --file pom.xml --settings maven-settings.xml -pl keycloak/extensions,keycloak/docker
- name: Build the docker-compose stack
run: |
USER="$(id -u)"
GROUP=""
export USER
export GROUP
echo "Running as ${USER}:${GROUP}"
java bin/envcheck.java
touch deployments/local/dev/keycloakx/acme.test+1.pem
java start.java --http --extensions=jar --keycloak=keycloakx --ci=github --detach
- name: Show current containers
run: |
docker ps -a
# - name: Check keycloak is reachable
# run: docker run --network container:dev_acme-keycloak_1 --rm appropriate/curl -s --retry 15 --max-time 180 --retry-connrefused http://localhost:8080/auth/realms/acme-internal
- name: Sleep
uses: jakejarvis/wait-action@master
with:
time: '70s'
- name: Check docker-compose stack
if: ${{ always() }}
run: |
docker ps -a
docker inspect dev-acme-keycloak-1
docker logs --details dev-acme-keycloak-1
- name: Run cypress tests
working-directory: ./keycloak/e2e-tests
# https://docs.cypress.io/guides/references/configuration#Timeouts
run: |
yarn install
docker run --network container:dev-acme-keycloak-1 --rm -v "${PWD}":/e2e -w /e2e --entrypoint=cypress cypress/included:10.8.0 run --config pageLoadTimeout=70000,defaultCommandTimeout=10000,watchForFileChanges=false --env keycloak_host=http://localhost:8080
- name: Archive testrun video
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: testrun-video
path: ./keycloak/e2e-tests/cypress/videos/
retention-days: 1
- name: Shutdown the docker-compose stack
if: ${{ always() }}
run: java stop.java --skip=grafana