CI E2E #6517
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: CI E2E | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 1 * * *" | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
main: | |
name: Cypress | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
strategy: | |
fail-fast: false # https://github.com/cypress-io/github-action/issues/48 | |
matrix: | |
containers: [1] | |
steps: | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- name: Setup Playground | |
run: docker-compose -f docker-compose.yml up -d | |
- run: corepack enable pnpm | |
- uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "pnpm" | |
# install specific version of chrome | |
- name: Install latest Google Chrome | |
run: | | |
wget "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" | |
sudo dpkg -i "google-chrome-stable_current_amd64.deb" | |
- run: pnpm install --frozen-lockfile | |
- run: .github/workflows/ci/wait-for http://localhost:3001/_actuator/probes/liveness -t 240 | |
- run: .github/workflows/ci/wait-for http://localhost:3002/_actuator/probes/liveness -t 240 | |
- run: .github/workflows/ci/wait-for http://localhost:19551/ping -t 240 | |
## Implement ping on server side to do full e2e | |
- uses: cypress-io/github-action@248bde77443c376edc45906ede03a1aba9da0462 # v5.8.4 | |
with: | |
config-file: cypress.config.js | |
install: false | |
record: true | |
parallel: true | |
start: pnpm dev | |
browser: chrome | |
spec: cypress/e2e/** | |
tag: ${{ github.event_name }} | |
working-directory: ./apps/web | |
env: | |
CYPRESS_E2E: true | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |