Altinn / Altinn/app-frontend-react

Cypress workflow: Deduplicate effort and add code coverage

Open
#2,301 0 comments 0 reactions 0 assignees View on GitHub
quality/debt
Dominant language
TypeScript
Stars
21
Forks
33
Avg merge
6d 23h
Merged PRs (30d)
3

Description

The Cypress workflow we already have (aka the github cypress runner) could do with improvements:

1. ~~It should avoid building 3 different copies of app-frontend (i.e. it should build the frontend first and then fork out to 3 different runners later)~~
2. It should inject code coverage measuring and measure coverage on the cypress tests
3. It should run the lint and jest tests as well, to collect overall coverage and merge all that coverage in the end. If it's possible to do the above _without_ this step, this should be considered optional.
4. (Optional) it should be possible to run external tests in parallel, and without having an entirely different workflow for external contributions. Having a separate workflow increases the potential for bugs or missing the external workflow when we change the internal workflow.

This issue details what #955 started implementing, which lives in the `feat/cypress-code-coverage` branch.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing GitHub Cypress workflow and the feat/cypress-code-coverage branch referenced in the issue. Trace how Cypress, lint, and Jest tests currently run, then define the workflow changes needed to merge their coverage and avoid duplicate frontend builds. Done means the workflow collects the requested coverage and preserves the existing test paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, github-actions, typescript
Domain
ci-cd, testing
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.