Try running e2e tests in CI without loading image #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: push | |
jobs: | |
run-e2e: | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: 21 | |
distribution: 'oracle' | |
- name: Set up node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20.17.0 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build JAR with mvn package | |
run: mvn clean package | |
- name: Build the docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
tags: uni-luzern:latest | |
load: true | |
push: false | |
outputs: type=docker,dest=/tmp/okr-docker-image.tar | |
- name: Run docker image | |
run: docker run --rm -v ./static:/resources -p 8080:8080 uni-luzern:latest & | |
- name: Cypress run e2e tests | |
uses: cypress-io/github-action@v6 | |
with: | |
build: npm i -D cypress | |
install: false | |
wait-on: 'http://localhost:8080/' | |
wait-on-timeout: 120 | |
browser: chrome | |
headed: false | |
working-directory: src/test/e2e | |
config: baseUrl=http://localhost:8080 |