chore(deps): update npm non-major dependencies (v3) #4856
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: Cypress | |
on: | |
push: | |
branches: [main] | |
paths: | |
- 'src/**' | |
- 'test/**' | |
- 'yarn.lock' | |
- '.github/workflows/cypress.yml' | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'test/**' | |
- 'yarn.lock' | |
- '.github/workflows/cypress.yml' | |
workflow_dispatch: | |
jobs: | |
internal: | |
if: | | |
github.repository_owner == 'Altinn' && | |
(github.event_name != 'pull_request' && github.event.repository.fork == false) || | |
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == false) | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
machines: [1, 2, 3] | |
name: Internal | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Increase file watchers | |
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- uses: actions/cache@v4 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn --immutable | |
- name: Build | |
run: yarn build | |
- name: Run tests | |
env: | |
CYPRESS_PROJECT_ID: y2jhp6 | |
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }} | |
PERCY_PARALLEL_TOTAL: 3 | |
PERCY_PARALLEL_NONCE: ${{ github.run_id }}-${{ github.run_attempt }} | |
run: " | |
yarn run cy:verify\n | |
bash -c 'yarn serve 8080 >/dev/null &'\n | |
bash -c 'npx percy exec --parallel -- yarn run cy:test:all:headless | |
--env environment=tt02 | |
--record | |
--parallel | |
--tag \"altinn-app-frontend\" | |
--group altinn-app-frontend | |
--ci-build-id $GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT' | |
" | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: redux-state-history | |
path: test/redux-history/*.json | |
external: | |
if: | | |
github.repository_owner == 'Altinn' && | |
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true) | |
runs-on: ubuntu-latest | |
name: External | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Increase file watchers | |
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '18' | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn config get cacheFolder)" | |
- uses: actions/cache@v4 | |
id: yarn-cache | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install dependencies | |
run: yarn --immutable | |
- name: Build | |
run: yarn build | |
- name: Verify cypress and run tests | |
run: " | |
yarn run cy:verify\n | |
bash -c 'yarn serve 8080 >/dev/null &'\n | |
bash -c 'yarn run cy:test:all:headless | |
--config watchForFileChanges=false | |
--env environment=tt02' | |
" | |
- uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: redux-state-history | |
path: | | |
test/redux-history/*.json | |
test/screenshots/* | |
test/videos/* |