Skip to content

Commit 10db7b8

Browse files
committed
switch to monorepo
1 parent 445faf4 commit 10db7b8

File tree

859 files changed

+1009765
-656601
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

859 files changed

+1009765
-656601
lines changed

.babelrc

Lines changed: 0 additions & 22 deletions
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
name: catalogue-meta-schema-check
2-
on:
3-
push:
4-
branches:
5-
- "main"
6-
pull_request:
1+
# /* eslint-disable */
2+
#name: catalogue-meta-schema-check
3+
#on:
4+
# push:
5+
# branches:
6+
# - "main"
7+
# pull_request:
78

8-
jobs:
9-
check-catalogue-meta-schema:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- name: Checkout 🛎️
13-
uses: actions/[email protected]
14-
with:
15-
persist-credentials: false
16-
- name: Install and build 🔧
17-
run: | # Install packages and build the catalogue meta.json file for schema checks only
18-
yarn
19-
yarn build-catalogue-meta
9+
#jobs:
10+
# check-catalogue-meta-schema:
11+
# runs-on: ubuntu-latest
12+
# steps:
13+
# - name: Checkout 🛎️
14+
# uses: actions/[email protected]
15+
# with:
16+
# persist-credentials: false
17+
# - name: Install pnpm
18+
# run: npm install -g pnpm --force
19+
# - name: Setup pnpm global bin
20+
# run: pnpm setup
21+
# - name: Install NX CLI
22+
# run: pnpm add -g nx
23+
# - name: Install and build 🔧
24+
# run: |
25+
# pnpm install --frozen-lockfile
26+
# nx run-many -t build-catalogue-meta

.github/workflows/check-formatting.yml

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,33 +14,37 @@ jobs:
1414
node-versions: [20.x]
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v4
18+
19+
- name: Install pnpm
20+
run: npm install -g pnpm
21+
22+
- name: Setup pnpm global bin
23+
run: pnpm setup
1824

1925
- name: Use Node.js ${{ matrix.node-version }}
2026
uses: actions/setup-node@v4
2127
with:
2228
node-version: ${{ matrix.node-version }}
2329

2430
- name: Node cache
25-
id: yarn-cache
26-
uses: actions/cache@v3
31+
id: pnpm-cache
32+
uses: actions/cache@v4
2733
with:
2834
path: "**/node_modules"
29-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
35+
key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }}
3036

3137
- name: Install dependencies
32-
if: steps.yarn-cache.outputs.cache-hit != 'true'
33-
run: yarn install
38+
if: steps.pnpm-cache.outputs.cache-hit != 'true'
39+
run: pnpm install
3440

3541
- id: files
3642
uses: jitterbit/get-changed-files@v1
3743
with:
3844
format: csv
3945

40-
- name: Run scoped actions
41-
uses: DukeManh/scoped-actions@v1
42-
with:
43-
files: ${{ steps.files.outputs.added_modified}}
44-
eslintTarget: "src/**/*.{jsx,tsx,ts,js}"
45-
s0: "yarn run eslint"
46-
s1: "yarn run prettier --check"
46+
- name: Lint all projects
47+
run: npx nx run-many --target=lint --all --exclude docs
48+
49+
- name: Prettier all projects
50+
run: pnpm prettier:check
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: cypress-testing
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
cypress-run:
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
- name: Set up Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
21+
- name: Install pnpm
22+
run: npm install -g pnpm
23+
24+
- name: Install Cypress binary
25+
run: npx cypress install
26+
27+
- name: Install dependencies
28+
run: pnpm install
29+
30+
- name: Remove Xvfb lock file (if exists)
31+
run: rm -f /tmp/.X99-lock
32+
33+
- name: Run Cypress tests
34+
run: npx nx run-many -t component-test --parallel=false

.github/workflows/cypress_tests.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: tests
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-versions: [20.x,22.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: ${{ matrix.node-version }}
23+
24+
- name: Install pnpm
25+
run: npm install -g pnpm
26+
27+
- name: Install dependencies
28+
run: pnpm install --frozen-lockfile
29+
30+
- name: Run component tests
31+
run: npx nx run-many -t test:noninteractive --all --skip-nx-cache
32+
33+
- name: Build all projects
34+
run: npx nx run-many -t build --all --exclude storybook-composition docs

.github/workflows/node_version_test.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/publish.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
name: Publish node.js Package
22
on:
33
push:
4-
tags:
4+
tags:
55
- v*
6+
67
jobs:
78
build:
89
runs-on: ubuntu-latest
910
steps:
10-
- uses: actions/checkout@v2
11+
- uses: actions/checkout@v4
12+
with:
13+
fetch-depth: 0
14+
# Install pnpm
15+
- name: Install pnpm
16+
run: npm install -g pnpm
1117
# Setup .npmrc file to publish to npm
12-
- uses: actions/setup-node@v2
18+
- uses: actions/setup-node@v4
1319
with:
14-
node-version: '20.x'
20+
node-version: '22.x'
1521
registry-url: 'https://registry.npmjs.org'
16-
- run: yarn
17-
- run: yarn build
18-
- run: yarn test:noninteractive
19-
- run: yarn publish
22+
cache: 'pnpm'
23+
- run: pnpm install --no-frozen-lockfile
24+
- run: npx nx run-many -t build --all --exclude storybook-composition docs
25+
- run: npx nx run-many -t nx-release-publish --all --skip-nx-cache --exclude storybook-composition docs
2026
env:
2127
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/storybook.yml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build and deploy storybook
1+
name: Build and deploy storybook
22
on:
33
push:
44
branches:
@@ -8,19 +8,37 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout 🛎️
11-
uses: actions/checkout@v2.3.1
11+
uses: actions/checkout@v4
1212
with:
1313
persist-credentials: false
14+
# Install pnpm
15+
- name: Install pnpm
16+
run: npm install -g pnpm
1417
- name: Install and build 🔧
1518
run: | # Install packages and build the Storybook files
16-
yarn
17-
yarn build-catalogue-meta
18-
yarn build-storybook
19+
pnpm i
20+
npx nx run-many -t build-catalogue-meta --all --exclude docs
21+
npx nx run-many -t build-storybook --all --exclude docs
22+
23+
- name: Collect Storybook builds 📦
24+
run: |
25+
mkdir -p docs-build
26+
for dir in apps packages; do
27+
echo "Collecting Storybook builds from $dir"
28+
for subdir in $dir/*/; do
29+
name=$(basename "$subdir")
30+
if [ -d "$subdir/storybook-static" ]; then
31+
echo "Processing $subdir"
32+
mv "$subdir/storybook-static" "docs-build/$name"
33+
fi
34+
done
35+
done
36+
1937
- name: Deploy 🚀
2038
uses: JamesIves/[email protected]
2139
with:
2240
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23-
BRANCH: main # The branch the action should deploy to.
41+
BRANCH: docs # The branch the action should deploy to.
2442
FOLDER: docs-build # The folder that the build-storybook script generates files.
2543
CLEAN: true # Automatically remove deleted files from the deploy branch
2644
TARGET_FOLDER: docs # The folder that we serve our Storybook files from

0 commit comments

Comments
 (0)