Skip to content

Playwright tests

Playwright tests #395

Workflow file for this run

name: Playwright tests
on:
push:
workflow_dispatch:
schedule:
- cron: 00 00 * * *
jobs:
test:
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Build frontend # result: eaas-frontend-admin/dist landing-page/dist
run: ./build.sh
- name: Zip frontend
run: zip -r eaas_ui.zip eaas-frontend-admin/dist landing-page/dist
shell: bash
- name: Clone corresponding eaas-server branch with same name (if exists)
run: |
./clone-eaas-server.sh
- name: Build server
run: ./compile-locally.sh # result: eaas-server/src/ear/target/eaas-server.ear
working-directory: ./eaas-server
- uses: emulation-as-a-service/eaas-installer@HEAD
env:
eaas_server_url: "./eaas-server/src/ear/target/eaas-server.ear"
eaas_ui_url: "./eaas_ui.zip"
wait_for_eaas_server: true
- name: Install dependencies
run: npm ci
working-directory: ./test
- name: Install Playwright browsers
run: npx playwright install --with-deps
working-directory: ./test
- name: Run Playwright tests
run: npx playwright test --project=chromium
working-directory: ./test
env:
trace: ${{ github.run_attempt > 1 && 'on' || '' }}
- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: "./test/test-results/"
retention-days: 30
- uses: actions/upload-artifact@v3
if: always()
with:
name: html-report
path: "./test/html-report/"
retention-days: 30
- uses: actions/upload-artifact@v3
if: always()
with:
name: json-report
path: "./test/json-report.json"
retention-days: 30
- uses: actions/upload-artifact@v3
if: always()
with:
name: eaas-server-logs
path: "/eaas-home/log/server/server.log"
retention-days: 30