Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize PR checks #12636

Closed
wants to merge 115 commits into from
Closed

Optimize PR checks #12636

wants to merge 115 commits into from

Conversation

mlqn
Copy link
Contributor

@mlqn mlqn commented Apr 8, 2024

Description

Optimization of PR checks to reduce execution time and decrease resource consumption.

  • Removed build-image-on-pr.yaml workflow as Docker images are already built by Playwright tests
  • Removed Building job from frontend-unit-tests.yml workflow as the solution is already built by Playwright tests
  • Removed Build all images job from run-playwright-on-pr.yaml as the solution is already built during setup
  • Removed Stop compose file job from run-playwright-on-pr.yaml as it's already stopped when the VM is stopped
  • Removed dotnet build from Dockerfile as the backend is already built by dotnet publish
  • Fixed the typecheck command to prevent it from running multiple times. This is a quick fix, we should fix the tsconfig.json files to make them work per workspace (see: Fix typecheck command #13031)
  • Optimized Dockerfile layer caching by separating the copying of package.json and yarn.lock files
  • Added layer caching to the docker-compose command used during Playwright tests
  • Added a concurrency control on run-playwright-on-pr.yaml to stop previous running instances
  • Added the --cache flag to the eslint command to only check changed files
  • Added the --changedSince flag to the Jest command to only run tests impacted by changes in a PR
    We still run all the tests when merging a PR into main, as it seems that sometimes this command does not execute all the impacted files.

PR checks

BEFORE AFTER
before after

Docker layer caching

BEFORE AFTER
before after

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)

@mlqn mlqn linked an issue Apr 8, 2024 that may be closed by this pull request
@github-actions github-actions bot added the skip-releasenotes Issues that do not make sense to list in our release notes label Apr 8, 2024
@mlqn mlqn removed a link to an issue Jun 18, 2024
@mlqn mlqn mentioned this pull request Jun 18, 2024
2 tasks
@mlqn
Copy link
Contributor Author

mlqn commented Jun 26, 2024

Will be solved by #13032

@mlqn mlqn closed this Jun 26, 2024
@mlqn mlqn deleted the 12474-remove-duplicated-pr-checks-2 branch June 28, 2024 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/app-deploy Area: Related to deploying apps from Altinn Studio to Altinn Apps. area/dashboard Area: Related to the dashboard skip-releasenotes Issues that do not make sense to list in our release notes solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant