-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6490903
commit 4e42cf0
Showing
10 changed files
with
2,874 additions
and
396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# checks if nuxt module builds successfully | ||
|
||
name: Build Nuxt Module | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'packages/common/**' | ||
- 'packages/nuxt/**' | ||
- 'packages/vue/**' | ||
pull_request: | ||
paths: | ||
- 'packages/common/**' | ||
- 'packages/nuxt/**' | ||
- 'packages/vue/**' | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Set up Node ⬢ | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies 🧱 | ||
run: pnpm i | ||
|
||
- name: Build static Storybook 🛠 | ||
run: make nuxt-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
# https://storybook.js.org/docs/vue/writing-tests/test-runner#run-against-non-deployed-storybooks | ||
|
||
name: 'Storybook & Testing CI' | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'packages/common/**' | ||
- 'packages/vue/**' | ||
pull_request: | ||
paths: | ||
- 'apps/vue-storybook/**' | ||
- 'packages/common/**' | ||
- 'packages/vue/**' | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Set up Node ⬢ | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies 🧱 | ||
run: pnpm i | ||
|
||
- name: Build Storybook | ||
run: make vue-storybook-build | ||
|
||
- name: Upload build to artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: storybook | ||
path: apps/vue-storybook/storybook_compiled | ||
|
||
a11y: | ||
name: Accessibility Tests | ||
needs: build | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Set up Node ⬢ | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies 🧱 | ||
run: pnpm i | ||
|
||
- name: Install Playwright | ||
run: pnpm --filter @explorer-1/vue-storybook exec playwright install | ||
|
||
- name: Download storybook build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: storybook | ||
path: apps/vue-storybook/storybook_compiled | ||
|
||
- name: Serve Storybook and run tests | ||
run: | | ||
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ | ||
"pnpm --filter @explorer-1/vue-storybook start" \ | ||
"pnpm --filter @explorer-1/vue-storybook test:storybook:ci" | ||
chromatic: | ||
name: Publish | ||
needs: [build] | ||
timeout-minutes: 30 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Set up Node ⬢ | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies 🧱 | ||
run: pnpm i | ||
|
||
- name: Download storybook build | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: storybook | ||
path: apps/vue-storybook/storybook_compiled | ||
|
||
- uses: chromaui/action@v1 | ||
# Options required for Chromatic's GitHub Action | ||
with: | ||
storybookBuildDir: 'apps/vue-storybook/storybook_compiled' | ||
#👇 Chromatic projectToken, | ||
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
exitOnceUploaded: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# checks if vue package builds successfully | ||
|
||
name: Build Vue Library | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'packages/common/**' | ||
- 'packages/vue/**' | ||
pull_request: | ||
paths: | ||
- 'packages/common/**' | ||
- 'packages/vue/**' | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup pnpm | ||
uses: pnpm/action-setup@v4 | ||
|
||
- name: Set up Node ⬢ | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies 🧱 | ||
run: pnpm i | ||
|
||
- name: Build static Storybook 🛠 | ||
run: make vue-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import type { TestRunnerConfig } from '@storybook/test-runner' | ||
import { injectAxe, checkA11y } from 'axe-playwright' | ||
|
||
/* | ||
* See https://storybook.js.org/docs/writing-tests/test-runner#test-hook-api | ||
* to learn more about the test-runner hooks API. | ||
*/ | ||
const config: TestRunnerConfig = { | ||
async preVisit(page) { | ||
await injectAxe(page) | ||
}, | ||
async postVisit(page) { | ||
await checkA11y(page, '#storybook-root', { | ||
detailedReport: true, | ||
detailedReportOptions: { | ||
html: true | ||
} | ||
}) | ||
} | ||
} | ||
|
||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"onlyChanged": true, | ||
"projectId": "Project:668c47cbeb95392cd79c3c0d", | ||
"storybookBaseDir": "apps/vue-storybook", | ||
"zip": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.