-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alexandre Philibeaux <[email protected]>
- Loading branch information
Showing
13 changed files
with
506 additions
and
508 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 |
---|---|---|
|
@@ -9,85 +9,104 @@ on: | |
- main | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
node: ["22"] | ||
runs-on: ubuntu-24.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_CACHE: "remote:rw" | ||
steps: | ||
- uses: actions/checkout@v4 # v4.1.4 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- name: build | ||
run: | | ||
pnpm install --frozen-lockfile | ||
pnpm run build | ||
manypkg: | ||
runs-on: ubuntu-24.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
TURBO_CACHE: "remote:rw" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 22 | ||
cache: "pnpm" | ||
- run: | | ||
- name: manypkg | ||
run: | | ||
pnpm install --frozen-lockfile | ||
pnpm exec manypkg check | ||
typecheck: | ||
runs-on: ubuntu-24.04 | ||
needs: [build] | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
TURBO_CACHE: "remote:rw" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 22 | ||
cache: "pnpm" | ||
- run: | | ||
- name: typecheck | ||
run: | | ||
pnpm install --frozen-lockfile | ||
pnpm typecheck | ||
oxlint: | ||
runs-on: ubuntu-24.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
TURBO_CACHE: "remote:rw" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 22 | ||
cache: "pnpm" | ||
- run: | | ||
- name: oxlint | ||
run: | | ||
pnpm install --frozen-lockfile | ||
pnpm build | ||
pnpm oxlint -c .oxlintrc.json --quiet | ||
lint: | ||
runs-on: ubuntu-24.04 | ||
needs: [build] | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
TURBO_CACHE: "remote:rw" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 22 | ||
cache: "pnpm" | ||
- run: | | ||
- name: lint | ||
run: | | ||
pnpm install --frozen-lockfile | ||
pnpm build | ||
pnpm run build | ||
pnpm run lint | ||
format: | ||
runs-on: ubuntu-24.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
TURBO_CACHE: "remote:rw" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 22 | ||
cache: "pnpm" | ||
|
@@ -99,18 +118,17 @@ jobs: | |
runs-on: ubuntu-24.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
TURBO_CACHE: "remote:rw" | ||
needs: [typecheck, format] | ||
strategy: | ||
matrix: | ||
node: ["22"] | ||
node: ["20", "22"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 10 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "pnpm" | ||
|
@@ -139,35 +157,16 @@ jobs: | |
# - run: pnpm run build | ||
# - run: pnpm install | ||
# - run: pnpm run test:a11y | ||
build: | ||
strategy: | ||
matrix: | ||
node: ["22"] | ||
runs-on: ubuntu-24.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
needs: [typecheck, format] | ||
steps: | ||
- uses: actions/checkout@v4 # v4.1.4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: | | ||
pnpm install --frozen-lockfile | ||
pnpm run build | ||
|
||
publint: | ||
runs-on: ubuntu-24.04 | ||
env: | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
TURBO_CACHE: "remote:rw" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- name: Use Node.js | ||
- name: publint | ||
uses: actions/[email protected] | ||
with: | ||
node-version: 22 | ||
|
@@ -178,12 +177,15 @@ jobs: | |
deploy: | ||
runs-on: ubuntu-24.04 | ||
needs: [publint, typecheck, build] | ||
env: | ||
IMAGE_NAME: rg.fr-par.scw.cloud/ultraviolet/storybook | ||
DEPLOYMENT_NAME: "storybook" | ||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | ||
TURBO_REMOTE_ONLY: true | ||
needs: [publint, typecheck, build] | ||
TURBO_CACHE: "remote:rw" | ||
# https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/accessing-contextual-information-about-workflow-runs#example-usage-of-the-jobs-context | ||
outputs: | ||
base_url: ${{ steps.deploy.outputs.url }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Inject slug/short variables | ||
|
@@ -296,3 +298,31 @@ jobs: | |
run: | | ||
rm -rf /tmp/docs/.buildx-cache | ||
mv /tmp/docs/.buildx-cache-new /tmp/docs/.buildx-cache | ||
e2e: | ||
timeout-minutes: 5 | ||
runs-on: ubuntu-latest | ||
needs: [deploy] | ||
env: | ||
CI: true | ||
TURBO_CACHE: "remote:rw" | ||
BASE_URL: ${{ needs.deploy.outputs.base_url }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: pnpm/[email protected] | ||
- uses: actions/[email protected] | ||
with: | ||
node-version: 22 | ||
cache: "pnpm" | ||
- name: install pnpm deps | ||
run: | | ||
pnpm install --frozen-lockfile | ||
pnpm exec playwright install --with-deps | ||
- name: run e2e | ||
run: pnpm run test:e2e | ||
- uses: actions/upload-artifact@v4 | ||
if: ${{ !cancelled() }} | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 5 |
This file was deleted.
Oops, something went wrong.
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,9 @@ | ||
import { expect, test } from '@playwright/test' | ||
|
||
test.describe('Default', () => { | ||
test('title', async ({ page, baseURL }) => { | ||
await page.goto(`${baseURL}`) | ||
|
||
await expect(page).toHaveTitle('Get started - Docs ⋅ Storybook') | ||
}) | ||
}) |
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.