This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
Setup e2e tests to run in github actions #441
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
name: Test and build | |
on: | |
pull_request: | |
branches: | |
- main | |
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: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
node-version: 16 | |
- name: Install dependencies | |
# --frozen-lockfile: doesn't generate a yarn.lock file, fails if an update is needed. | |
run: yarn install --frozen-lockfile | |
- name: Linter | |
run: yarn lint:all | |
- name: Prettier | |
run: yarn prettier:check | |
- name: Unit tests | |
run: yarn test:all | |
- name: Typescript test | |
run: yarn tsc | |
- name: Build code | |
run: yarn build:all | |
- name: Install playwright browsers | |
run: yarn playwright install --with-deps | |
- name: E2E tests | |
run: | | |
yarn dev:e2e & | |
yarn wait-on http://localhost:3000 | |
yarn e2e | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: test-results | |
path: packages/e2e/test-results/ | |
retention-days: 30 |