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

[Actions] ⚡ Optimize workflows #3480

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

[Actions] ⚡ Optimize workflows #3480

wants to merge 24 commits into from

Conversation

KenAJoh
Copy link
Collaborator

@KenAJoh KenAJoh commented Dec 20, 2024

Description

https://github.com/navikt/aksel/actions/metrics/performance

Optimized some of our actions and removed duplicate code by creating some "composite" actions. We now only have to update a single action when changing build and boot.

Lessons:

  • Fetch-depth 1 saves up to 45 seconds each run 😮
  • Using composite actions handles cache a little better
  • Validating links in "verify-all" e2e-test used at least 40% of the time, and didn't actually test the links 💀

Component Checklist 📝

  • JSDoc
  • Examples
  • Documentation / Decision Records
  • Storybook
  • Style mappings (@navikt/core/css/config/_mappings.js)
  • Component tokens (@navikt/core/css/tokens.json)
  • CSS class deprecations (@navikt/aksel-stylelint/src/deprecations.ts)
  • Exports (@navikt/core/react/src/index.ts and @navikt/core/react/package.json)
  • New component? CSS import (@navikt/core/css/index.css)
  • Breaking change? Update migration guide. Consider codemod.
  • Changeset (Format: <Component>: <gitmoji?> <Text>. E.g. "Button: ✨ Add feature xyz.")

Copy link

changeset-bot bot commented Dec 20, 2024

⚠️ No Changeset found

Latest commit: f94ce74

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This solved a AXE-test issue where it said the icon without aria-labelledby did not have a label

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By validating imports before commit, we can get instant feedback and be more sure of sandbox working. We also avoid having to check all the examples in sandbox with e2e

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can remove this and save a bunch of time since we can validate stories before build

  • Validate URL-length: aksel.nav.no/website/scripts/update-examples/parts/parse-code-files.ts
  • Validate imports with ESLINT

If both if these make no changes/has no errors, we can assue that the demo works. Just in case i added a new sandbox.e2e.ts test that checks that the sandbox itself is working with ds-react

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the dialog is already in the dom, a reagular AXE-scan in "verify-all" already checks for a11y in the search.

Copy link
Contributor

github-actions bot commented Dec 23, 2024

Storybook demo / Chromatic

9990e4aeb | 91 components | 135 stories

@KenAJoh KenAJoh marked this pull request as ready for review December 28, 2024 10:03
@larseirikhansen larseirikhansen self-requested a review January 8, 2025 09:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant