fix(deps): update dependency react-toastify to v11 #710
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 | |
on: | |
# on push event to main run this workflow | |
# only run on push to main as pushes to PRs are handled by the `pull_request` trigger | |
push: | |
branches: | |
- "main" | |
# trigger on pull_request action | |
pull_request: | |
# Merge group trigger for merge queues | |
merge_group: | |
# Allow to manually trigger the workflow | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
cancel-in-progress: false | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
run_install: false | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
cache: "pnpm" | |
cache-dependency-path: "pnpm-lock.yaml" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Type-check | |
run: pnpm check | |
- name: Build | |
run: pnpm build | |
env: | |
VITE_RECAPTCHA_SITE_KEY: 123456789 | |
- name: Get Latest playwright version | |
run: echo "PLAYWRIGHT_VERSION=$(pnpm show playwright version)" >> $GITHUB_ENV | |
- name: Cache playwright binaries | |
uses: actions/cache@v4 | |
id: playwright-cache | |
with: | |
path: | | |
~/.cache/ms-playwright | |
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }} | |
- name: Install playwright | |
run: pnpm dlx playwright install --with-deps | |
- name: Unit tests | |
run: pnpm test:unit | |
cypress: | |
name: Cypress | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
with: | |
version: 9 | |
- name: Install Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: "package.json" | |
cache: "pnpm" | |
cache-dependency-path: "pnpm-lock.yaml" | |
# use the Cypress GitHub Action to run Cypress tests within the chrome browser | |
- name: Cypress | |
uses: cypress-io/github-action@v6 | |
with: | |
install: true | |
build: pnpm build:test | |
# we launch the app in preview mode to avoid issues with hmr websockets from vite polluting the mocks | |
start: pnpm preview:test | |
browser: chrome | |
quiet: true | |
config-file: cypress.config.ts | |
env: | |
VITE_PORT: ${{ vars.VITE_PORT }} | |
VITE_VERSION: ${{ vars.VITE_VERSION }} | |
VITE_GRAASP_DOMAIN: ${{ vars.VITE_GRAASP_DOMAIN }} | |
VITE_GRAASP_API_HOST: ${{ vars.VITE_GRAASP_API_HOST }} | |
VITE_GRAASP_PLAYER_HOST: ${{ vars.VITE_GRAASP_PLAYER_HOST }} | |
VITE_GRAASP_LIBRARY_HOST: ${{ vars.VITE_GRAASP_LIBRARY_HOST }} | |
VITE_GRAASP_ANALYZER_HOST: ${{ vars.VITE_GRAASP_ANALYZER_HOST }} | |
VITE_SHOW_NOTIFICATIONS: ${{ vars.VITE_SHOW_NOTIFICATIONS }} | |
VITE_GRAASP_REDIRECTION_HOST: ${{ vars.VITE_GRAASP_REDIRECTION_HOST }} | |
# after the test run completes | |
# store any screenshots | |
# NOTE: screenshots will be generated only if E2E test failed | |
# thus we store screenshots only on failures | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: cypress-screenshots | |
path: cypress/screenshots | |
- name: coverage report | |
run: npx nyc report --reporter=text-summary |