Skip to content

[Snyk] Upgrade i18next from 23.11.5 to 23.16.4 #247

[Snyk] Upgrade i18next from 23.11.5 to 23.16.4

[Snyk] Upgrade i18next from 23.11.5 to 23.16.4 #247

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
- run: npm ci
- run: npm run build
- run: npm run coverage
- name: Upload Coverage Data
uses: actions/upload-artifact@v4
with:
path: coverage/coverage.json
# - name: Generate token
# id: generate-token
# uses: actions/create-github-app-token@v1
# with:
# app-id: ${{ secrets.CODE_COVERAGE_APP_ID }}
# private-key: ${{ secrets.CODE_COVERAGE_APP_SECRET }}
# - name: Find workflow id
# uses: actions/github-script@v7
# id: find-workflow-id
# with:
# github-token: ${{ steps.generate-token.outputs.token }}
# script: |
# const workflows = await github.request('GET /repos/{owner}/{repo}/actions/workflows', {
# owner: context.repo.owner,
# repo: context.repo.repo,
# headers: {
# 'X-GitHub-Api-Version': '2022-11-28'
# }
# })
# const mainWorkflow = workflows.data.workflows.find((workflow) => workflow.name == "Main")
# if (!mainWorkflow || !mainWorkflow.id) {
# return core.setFailed('Unable to find main workflow id')
# }
# core.setOutput('mainWorkflowId', mainWorkflow.id)
# - name: Find Latest Run id
# uses: actions/github-script@v7
# id: find-workflow-run-id
# env:
# MAIN_WORKFLOW_ID: ${{ steps.find-workflow-id.outputs.mainWorkflowId }}
# with:
# github-token: ${{ steps.generate-token.outputs.token }}
# script: |
# const mainWorkflowId = process.env['MAIN_WORKFLOW_ID']
# const baseSha = "${{ github.event.pull_request.base.sha }}"
# const mainWorkflowRuns = await github.request('GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs', {
# owner: context.repo.owner,
# repo: context.repo.repo,
# workflow_id: mainWorkflowId,
# headers: {
# 'X-GitHub-Api-Version': '2022-11-28'
# }
# })
# const mainWorkflowRun = mainWorkflowRuns.data.workflow_runs.find((run) => run.head_sha == baseSha)
# if (!mainWorkflowRun) {
# return core.setFailed("Unable to find main workflow run")
# }
# core.setOutput('mainWorkflowRunId', mainWorkflowRun.id)
# core.setOutput('mainWorkflowRunSha', mainWorkflowRun.head_sha)
# - name: Download coverage artifact from build of main branch
# uses: actions/download-artifact@v4
# id: download-coverage-file
# with:
# name: verify-prototype-covearge-${{ steps.find-workflow-run-id.outputs.mainWorkflowRunSha }}.json
# run-id: ${{ steps.find-workflow-run-id.outputs.mainWorkflowRunId }}
# github-token: ${{ steps.generate-token.outputs.token }}
# - name: Diff code coverage results
# uses: actions/github-script@v7
# env:
# MAIN_WORKFLOW_RUN_SHA: ${{ steps.find-workflow-run-id.outputs.mainWorkflowRunSha }}
# COVERAGE_FILE_PATH: ${{ steps.download-coverage-file.outputs.download-path }}
# PR_NUMBER: ${{ github.event.pull_request.number }}
# with:
# github-token: ${{ steps.generate-token.outputs.token }}
# script: |
# const script = require('./scripts/compare_coverage.js')
# const mainWorkflowRunSha = process.env['MAIN_WORKFLOW_RUN_SHA']
# const coverageFilePath = process.env['COVERAGE_FILE_PATH']
# const prNumber = process.env['PR_NUMBER']
# script({github, context, mainWorkflowRunSha, coverageFilePath, prNumber})
- name: Cypress testing
run: npm run e2e:headless
- name: Upload Screenshots
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-screenshots
path: cypress/screenshots
if-no-files-found: ignore
- name: Upload Videos
if: always()
uses: actions/upload-artifact@v4
with:
name: cypress-videos
path: cypress/videos
if-no-files-found: ignore
- name: Pa11y testing
run: npm run pa11y-ci