Skip to content

Adjust E2E tests for project configuration changes #707

Adjust E2E tests for project configuration changes

Adjust E2E tests for project configuration changes #707

Workflow file for this run

name: Continuous Integration
on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
# ––––––––––––––––––––––––––––––––––––––––––––––– #
# Lint & Format
# ––––––––––––––––––––––––––––––––––––––––––––––– #
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-node-environment
- name: Run linter
run: npm run lint
- name: Check format
run: npm run format:check
# ––––––––––––––––––––––––––––––––––––––––––––––– #
# Test
# ––––––––––––––––––––––––––––––––––––––––––––––– #
test:
name: Unit tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-node-environment
- name: Run unit tests
run: npm run test
- name: Report coverage
if: success()
uses: davelosert/vitest-coverage-report-action@v2
# ––––––––––––––––––––––––––––––––––––––––––––––– #
# Build the application
# ––––––––––––––––––––––––––––––––––––––––––––––– #
build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 5
env:
DOTENV_PRIVATE_KEY_DEVELOPMENT: ${{ secrets.DOTENV_PRIVATE_KEY_DEVELOPMENT }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.CI_GITHUB_PAT }}
- name: Setup environment
uses: ./.github/actions/setup-node-environment
- name: Build application
run: npm run build
# ––––––––––––––––––––––––––––––––––––––––––––––– #
# End-to-end tests
# ––––––––––––––––––––––––––––––––––––––––––––––– #
e2e-tests:
name: End-to-end tests
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
browser: [chrome, edge]
containers: [1, 2]
container:
image: cypress/browsers:node-20.18.0-chrome-129.0.6668.89-1-ff-131.0.2-edge-129.0.2792.65-1
options: --user 1001
env:
DOTENV_PRIVATE_KEY_DEVELOPMENT: ${{ secrets.DOTENV_PRIVATE_KEY_DEVELOPMENT }}
DOTENV_PRIVATE_KEY_TEST: ${{ secrets.DOTENV_PRIVATE_KEY_TEST }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.CI_GITHUB_PAT }}
- name: Execute Cypress tests
uses: cypress-io/github-action@v6
env:
CYPRESS_BASE_URL: 'http://127.0.0.1:4173'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
COMMIT_INFO_MESSAGE: '${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number }})'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
start: npm run preview -- --host
tag: ${{ github.event_name }},e2e,${{ matrix.browser }}
wait-on: ${{ env.CYPRESS_BASE_URL }}
wait-on-timeout: 120
record: true
parallel: true
browser: ${{ matrix.browser }}
ci-build-id: ${{ github.run_id }}-e2e-${{ matrix.browser }}
spec: |
cypress/e2e/participant/default-tests/**/*.cy.js
cypress/e2e/partner-admin/default-tests/**/*.cy.js
# ––––––––––––––––––––––––––––––––––––––––––––––– #
# Component Tests
# ––––––––––––––––––––––––––––––––––––––––––––––– #
component-tests:
name: Component tests
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
browser: [chrome, edge]
container:
image: cypress/browsers:node-20.18.0-chrome-129.0.6668.89-1-ff-131.0.2-edge-129.0.2792.65-1
options: --user 1001
env:
DOTENV_PRIVATE_KEY_DEVELOPMENT: ${{ secrets.DOTENV_PRIVATE_KEY_DEVELOPMENT }}
DOTENV_PRIVATE_KEY_TEST: ${{ secrets.DOTENV_PRIVATE_KEY_TEST }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'true'
token: ${{ secrets.CI_GITHUB_PAT }}
- name: Execute Cypress tests
uses: cypress-io/github-action@v6
env:
CYPRESS_BASE_URL: 'http://127.0.0.1:4173'
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
COMMIT_INFO_MESSAGE: '${{ github.event.pull_request.title }} (#${{ github.event.pull_request.number }})'
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
component: true
start: npm run preview -- --host
tag: ${{ github.event_name }},component,${{ matrix.browser }}
wait-on: ${{ env.CYPRESS_BASE_URL }}
wait-on-timeout: 120
record: true
parallel: true
browser: ${{ matrix.browser }}
ci-build-id: ${{ github.run_id }}-component-${{ matrix.browser }}
spec: |
cypress/component/**/*.cy.js