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

Add vitest to GitHub actions #9162

Merged
merged 4 commits into from
Aug 8, 2024
Merged

Add vitest to GitHub actions #9162

merged 4 commits into from
Aug 8, 2024

Conversation

jazzsequence
Copy link
Contributor

@jazzsequence jazzsequence commented Aug 8, 2024

Fixes #9083
Replaces #9161

Summary

Adds a GitHub actions workflow to run npx vitest src/components on PRs that change files in src/ (can be altered to limit that scope to src/components/ or if the workflow itself is updated.

Also allows for manual triggering (workflow_dispatch) in the Actions tab.

@jazzsequence jazzsequence requested a review from a team as a code owner August 8, 2024 18:42
@jazzsequence
Copy link
Contributor Author

@jazzsequence jazzsequence self-assigned this Aug 8, 2024
Copy link
Contributor

@stevector stevector left a comment

Choose a reason for hiding this comment

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

Thanks @jazzsequence. I made the filename more specific.

@stevector stevector merged commit 8468bfa into nested-cert-nav Aug 8, 2024
4 checks passed
@stevector stevector deleted the 9083-add-vitest-ci branch August 8, 2024 20:38
@jazzsequence
Copy link
Contributor Author

I left it open ended in case we wanted to use it for other types of tests, but since we're running on specific paths, that's probably fine.

rachelwhitton added a commit that referenced this pull request Oct 24, 2024
* mdx and import ordering

* Update index.js

* whitespace fixes

* BackstopJS init for local VRT (#8989)

* removing potentially unneeded component

* Revert "removing potentially unneeded component"

This reverts commit d95bca8.

* removing releaseHeadlines from MdxWrapper

* adding more pages to backstop

* adding npx to instructions

* mdx customshortcodes

* Revert "BackstopJS init for local VRT (#8989)"

This reverts commit 5b9f380.

* starting on a new sidebar

* getting sidebar somewhat functional

* more sidebar nav playing

* Certification multilevel nav

* Getting certification working with multilevel menu

* more sidebar experimenting

* sidebar nav graphql-ing

* adding guides to omni nav

* adding subtitles

* adding stuff

* more nav

* link nesting

* more link mucking

* still working

* still working

* removing commented out code

* cleanup

* starting on omni component

* trying function in separate file

* functioning again

* submenus

* wrangling the guides

* getting decoupled guides

* more decouple guiding

* more simplification

* splitting up

* segmenting out guide function

* delete unused files

* guide!

* whitespace

* more re-arranging

* no errors

* remove unused stuff

* no errors with query coming from outside index.js

* more tweaks

* adding OmniSidebarNavWithFallback.js

* fallback is working in guide

* whitespace

* using fallback

* more cleanup

* getting rid of separate OmniSidebarNavWithFallback

* more cleanup

* link fix

* screenshot testing nav

* update prettier

* running prettier

* switching prettier standard based on internal discussion

* adding eslint

* adding eslint

* Revert "adding eslint"

This reverts commit f84fc28.

* Revert "adding eslint"

This reverts commit 7705f80.

* Revert "running prettier"

This reverts commit e4f05fb.

* small prettier formatting

* formatting

* manual spacing

* more manual

* manual formatting

* prettier with manual fix

* prettier fixes

* simplify regex

* prettier comment

* Revert "prettier comment"

This reverts commit 7f95a83.

* going back to work regex

* I do not even need the regex

* adding vitest

* adding unit tests samples

* moving helper functions to their own file

* more testing

* query in its own file

* more unit testing

* one more unit test

* fix

* removing helper functions that were too small

* more moving helper functions

* moving deck chairs

* removing a too small function. And removing sample unit test

* deleting separate sidebarNav component

* moving test fixture

* simplyfing a function

* simplify data structures

* running prettier

* checking for search js before adding it

* cleanup

* adding some doc blocks and minor refactor

* docs and cleanup

* more comments

* more cleanup

* more comments more tests

* adding all the front-end sites guides

* removing extra nav alert in the middle of decouple overview pages

* running prettier

* going back to old prettier config files. Redo this change under #9082

* starting to add a styling file for omnisidebarnav

* starting on styling

* getting external link indicator working

* remove extra arrow in link

* removing console.log

* Add vitest to GitHub actions (#9162)

* Add vitest to GHA

* Make a clean install

* switching from jsx to React.createElement()

* Update and rename test.yml to vitest.yml

---------

Co-authored-by: Steve Persch <steve.persch@pantheon.io>
Co-authored-by: Steve Persch <stevector@users.noreply.github.com>

* moving icon to back and setting to small

* testing readme

* fixing link

* copy fix

* changing addsearch back

* addsearch back

* adding vite.config.ts

* Updating import order

* update tests readme

* Apply Prettier formatting

* removing comment

* vitest fix, fingers crossed

* adding rollup

* package merges

* re-adding vitest stuff

---------

Co-authored-by: Rachel Whitton <rachel@pantheon.io>
Co-authored-by: Chris Reynolds <chris.reynolds@pantheon.io>
Co-authored-by: Pantheon Bot <bot@getpantheon.com>
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.

2 participants