Skip to content

Commit

Permalink
chore: Added Vitest GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Venefilyn committed Nov 22, 2024
1 parent b0cdd70 commit 8cd934c
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 21 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/test-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test frontend
on:
pull_request_target:
workflow_dispatch:

jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- uses: pnpm/action-setup@v4
with:
version: 9
run_install: false

- uses: actions/setup-node@v4
with:
node-version: "20"
cache: "pnpm"
cache-dependency-path: pnpm-lock.yaml

- name: Install and Build
run: |
(cd frontend && pnpm install);
make .install-logos
API_URL="https://prod.packit.dev/api" make transpile-prod
- name: Run Vitest
run: make test_frontend
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,37 @@ exports[`default label > default label 1`] = `
style="padding: 2px;"
>
<span
class="pf-v5-c-label pf-m-blue"
class="pf-v6-c-label pf-m-blue pf-m-filled"
>
<span
class="pf-v5-c-label__icon"
class="pf-v6-c-label__content"
>
<svg
aria-hidden="true"
class="pf-v5-svg"
fill="currentColor"
height="1em"
role="img"
viewBox="0 0 448 512"
width="1em"
<span
class="pf-v6-c-label__icon"
>
<path
d="M368 160h-.94a144 144 0 1 0-286.12 0H80a48 48 0 0 0 0 96h288a48 48 0 0 0 0-96zM195.38 493.69a31.52 31.52 0 0 0 57.24 0L352 288H96z"
/>
</svg>
</span>
<span
class="pf-v5-c-label__text"
>
Label fsdf
<svg
aria-hidden="true"
class="pf-v6-svg"
fill="currentColor"
height="1em"
role="img"
viewBox="0 0 448 512"
width="1em"
>
<path
d="M368 160h-.94a144 144 0 1 0-286.12 0H80a48 48 0 0 0 0 96h288a48 48 0 0 0 0-96zM195.38 493.69a31.52 31.52 0 0 0 57.24 0L352 288H96z"
/>
</svg>
</span>
<span
class="pf-v5-u-screen-reader"
class="pf-v6-c-label__text"
>
tooltipText
Label fsdf
<span
class="pf-v6-u-screen-reader"
>
tooltipText
</span>
</span>
</span>
</span>
Expand Down
1 change: 1 addition & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ export default defineConfig(() => ({
},
test: {
environment: "happy-dom",
reporters: process.env.GITHUB_ACTIONS ? ['dot', 'github-actions'] : ['dot'],
},
}));

0 comments on commit 8cd934c

Please sign in to comment.