Skip to content

default to ci tag

default to ci tag #70

Workflow file for this run

name: End-to-end tests
on:
push:
branches:
- mb-jn-1027-dockerized-e2e-ci #TODO
pull_request:
branches:
- mb-jn-1027-dockerized-e2e-ci #TODO
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: dbpwd
POSTGRES_USER: dbuser
POSTGRES_DB: pearl
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Build applications
run: |
REACT_APP_UNAUTHED_LOGIN=true ./gradlew :api-participant:jibDockerBuild -PreleaseVersion=ci
docker run -d -p 8081:8080 --net=host api-participant:ci > api-participant.log
REACT_APP_UNAUTHED_LOGIN=true ./gradlew :api-admin:jibDockerBuild -PreleaseVersion=ci
docker run -d -p 8080:8080 --net=host api-admin:ci > api-admin.log
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm -w e2e-tests test
- name: Upload API logs
if: always()
uses: actions/upload-artifact@v4
with:
name: api-logs
path: |
api-participant.log
api-admin.log
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
e2e-tests/playwright-report/**
e2e-tests/test-results/**