Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #203 from parodos-dev/dl/e2e-tests-on-ci
Browse files Browse the repository at this point in the history
Setup e2e tests to run in github actions
  • Loading branch information
wKich committed Aug 3, 2023
2 parents f4eea83 + 2777160 commit 39b2f15
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
33 changes: 33 additions & 0 deletions .github/workflows/on-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,26 @@ on:
jobs:
test-and-build:
runs-on: ubuntu-latest
services:
m2k:
image: quay.io/konveyor/move2kube-ui:latest
ports:
- 8082:8080
workflows:
image: quay.io/parodos-dev/workflow-service:latest
env:
workflows.m2k.url: http://m2k:8082
workflows.mta.url: http://mta:8083
SPRING_PROFILES_ACTIVE: local
NOTIFICATION_SERVER_URL: http://notifications:8081
ports:
- 8080:8080
notifications:
image: quay.io/parodos-dev/notification-service:latest
env:
SPRING_PROFILES_ACTIVE: local
ports:
- 8081:8080
env:
NODE_OPTIONS: --max-old-space-size=8192
steps:
Expand Down Expand Up @@ -38,3 +58,16 @@ jobs:

- name: Build code
run: yarn build:all

- name: Install playwright browsers
run: yarn playwright install --with-deps

- name: E2E tests
run: yarn e2e

- uses: actions/upload-artifact@v3
if: always()
with:
name: test-results
path: packages/e2e/test-results/
retention-days: 30
3 changes: 2 additions & 1 deletion packages/e2e/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,15 @@ export default defineConfig({
testDir: './tests',
reporter: [['list'], ['html']],
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
retries: process.env.CI ? 5 : 0,
/* Run tests in files in parallel */
fullyParallel: true,

use: {
baseURL: process.env.FRONTEND_URL ?? 'http://localhost:3000',
// run traces on the first retry of a failed test:q
trace: 'on-first-retry',
video: 'retain-on-failure',
},

projects: [
Expand Down

0 comments on commit 39b2f15

Please sign in to comment.