Skip to content

chore(deps): update devdependencies (non-major) (patch) #4185

chore(deps): update devdependencies (non-major) (patch)

chore(deps): update devdependencies (non-major) (patch) #4185

Workflow file for this run

name: Test
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:
unit:
name: Unit
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Mise
uses: jdx/mise-action@v3
- name: Lint, Type-check and Format
run: mise check
- name: Build
run: mise build
env:
VITE_RECAPTCHA: 123456789
VITE_GRAASP_H5P_INTEGRATION_URL: http://integration.url/mock-value.html
VITE_GRAASP_REDIRECTION_HOST: http://go.mock.com
- name: Unit tests
run: mise run test-unit
cypress:
name: Cypress
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Install Mise
uses: jdx/mise-action@v3
- name: Cache Cypress binary
uses: actions/cache@v4
with:
path: /home/runner/.cache/Cypress
key: cypress-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
cypress-cache-${{ runner.os }}-
- name: Install dependencies
run: pnpm install
- name: Install Cypress binary
run: pnpm cypress install
# use the Cypress GitHub Action to run Cypress Component tests within the chrome browser
- name: Cypress run components
uses: cypress-io/github-action@v6
with:
install: false
component: true
browser: chrome
quiet: true
config-file: cypress.config.ts
env:
VITE_PORT: ${{ vars.VITE_PORT }}
VITE_VERSION: ${{ vars.VITE_VERSION }}
VITE_GRAASP_API_HOST: ${{ vars.VITE_GRAASP_API_HOST }}
VITE_GRAASP_LIBRARY_HOST: ${{ vars.VITE_GRAASP_LIBRARY_HOST }}
VITE_SHOW_NOTIFICATIONS: ${{ vars.VITE_SHOW_NOTIFICATIONS }}
VITE_GRAASP_REDIRECTION_HOST: ${{ vars.VITE_GRAASP_REDIRECTION_HOST }}
# use the Cypress GitHub Action to run Cypress tests within the chrome browser
- name: Cypress
uses: cypress-io/github-action@v6
with:
install: false
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_API_HOST: ${{ vars.VITE_GRAASP_API_HOST }}
VITE_GRAASP_LIBRARY_HOST: ${{ vars.VITE_GRAASP_LIBRARY_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