Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/front-dependencies-installation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
uses: actions/cache@v5
id: front-node_modules
with:
path: "node_modules"
path: |
node_modules
packages/*/node_modules
key: front-node_modules-${{ hashFiles('yarn.lock') }}
- name: Setup Node.js
if: steps.front-node_modules.outputs.cache-hit != 'true'
Expand All @@ -32,5 +34,7 @@ jobs:
if: steps.front-node_modules.outputs.cache-hit != 'true'
uses: actions/cache@v5
with:
path: "node_modules"
path: |
node_modules
packages/*/node_modules
key: front-node_modules-${{ hashFiles('yarn.lock') }}
81 changes: 74 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ jobs:
- name: Restore the frontend cache
uses: actions/cache@v5
with:
path: "node_modules"
path: |
node_modules
packages/*/node_modules
key: front-node_modules-${{ hashFiles('yarn.lock') }}
fail-on-cache-miss: true
- name: Check linting
Expand All @@ -71,7 +73,9 @@ jobs:
- name: Restore the frontend cache
uses: actions/cache@v5
with:
path: "node_modules"
path: |
node_modules
packages/*/node_modules
key: front-node_modules-${{ hashFiles('yarn.lock') }}
fail-on-cache-miss: true
- name: Run tests
Expand All @@ -90,7 +94,9 @@ jobs:
- name: Restore the frontend cache
uses: actions/cache@v5
with:
path: "node_modules"
path: |
node_modules
packages/*/node_modules
key: front-node_modules-${{ hashFiles('yarn.lock') }}
fail-on-cache-miss: true
- name: Build
Expand All @@ -109,7 +115,9 @@ jobs:
- name: Restore the frontend cache
uses: actions/cache@v5
with:
path: "node_modules"
path: |
node_modules
packages/*/node_modules
key: front-node_modules-${{ hashFiles('yarn.lock') }}
fail-on-cache-miss: true
# Playwright browsers live outside node_modules and weigh hundreds of
Expand All @@ -130,7 +138,7 @@ jobs:
# The PDF viewer loads pdfjs's worker from /pdf.worker.mjs at runtime;
# copy it from the installed pdfjs-dist so the served public/ has it.
- name: Provision PDF worker
run: cp node_modules/pdfjs-dist/build/pdf.worker.mjs public/pdf.worker.mjs
run: yarn workspace @gouvfr-lasuite/ui-components copy-pdf-worker
- name: Generate test PDFs
run: yarn generate-test-pdfs
- name: Run component tests
Expand All @@ -141,6 +149,65 @@ jobs:
with:
name: playwright-report
path: |
e2e/report
test-results
packages/ui-components/e2e/report
packages/ui-components/test-results
retention-days: 7

storybook:
runs-on: ubuntu-latest
needs: install-front
permissions:
contents: read
actions: read
pages: read
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: "20.x"
- name: Restore the frontend cache
uses: actions/cache@v5
with:
path: |
node_modules
packages/*/node_modules
key: front-node_modules-${{ hashFiles('yarn.lock') }}
fail-on-cache-miss: true
- name: Configure GitHub Pages
id: pages
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/configure-pages@v5
- name: Build Storybook
run: yarn build-storybook
env:
STORYBOOK_BASE_PATH: ${{ steps.pages.outputs.base_path }}
- name: Upload GitHub Pages artifact
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v4
with:
path: storybook-static

deploy-storybook:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- storybook
- lint
- test
- build
- e2e
permissions:
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy Storybook to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
21 changes: 13 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ dist/
downloads/
eggs/
.eggs/
lib/
lib64/
/lib/
/lib64/
parts/
sdist/
var/
Expand All @@ -34,6 +34,11 @@ env.d/terraform

# npm
node_modules
.turbo
packages/*/.turbo
packages/*/dist
packages/ui-components/storybook-static
test-results


# Logs
Expand All @@ -47,15 +52,15 @@ node_modules
.pytest_cache
db.sqlite3
.mypy_cache
playwright/.cache/
**/playwright/.cache/
test-results
e2e/report
**/e2e/report/
# Provisioned at build/test time from node_modules/pdfjs-dist
public/pdf.worker.mjs
**/public/pdf.worker.mjs
# Generated by `yarn generate-test-pdfs`
public/storybook/preview-files/pdf_with_links.pdf
public/storybook/preview-files/pdf_with_js.pdf
public/storybook/preview-files/pdf_with_js_link.pdf
**/public/storybook/preview-files/pdf_with_links.pdf
**/public/storybook/preview-files/pdf_with_js.pdf
**/public/storybook/preview-files/pdf_with_js_link.pdf

# Site media
/data/
Expand Down
28 changes: 0 additions & 28 deletions .storybook/main.ts

This file was deleted.

19 changes: 0 additions & 19 deletions CONTRIBUTING.md

This file was deleted.

3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ WORKDIR /app
RUN corepack enable

COPY package.json yarn.lock ./
COPY packages/ui-components/package.json packages/ui-components/package.json
COPY packages/ui-tokens/package.json packages/ui-tokens/package.json
COPY packages/ui-codemod/package.json packages/ui-codemod/package.json
RUN yarn install --frozen-lockfile

COPY . .
Expand Down
Loading
Loading