Skip to content

Commit 2a44349

Browse files
Merge branch 'beta' into merge-from-beta
2 parents 8d3a8ff + ebd6e24 commit 2a44349

File tree

678 files changed

+183610
-111590
lines changed

Some content is hidden

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

678 files changed

+183610
-111590
lines changed

.eslintignore

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

.eslintrc.json

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

.github/workflows/release-beta.yml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
branches:
66
- beta
77

8+
concurrency:
9+
group: release-beta
10+
cancel-in-progress: true
11+
812
jobs:
913
release-beta:
10-
runs-on: ubuntu-latest
14+
runs-on: ubuntu-22.04
1115
steps:
1216
- name: Checkout
1317
uses: actions/checkout@v3
@@ -17,7 +21,7 @@ jobs:
1721
- name: Install NodeJS
1822
uses: actions/setup-node@v3
1923
with:
20-
node-version: lts/gallium
24+
node-version: lts/iron
2125

2226
- name: Cache Dependencies
2327
id: cache-dependencies
@@ -38,19 +42,14 @@ jobs:
3842
git config --local user.name "${{ secrets.GIT_USER_NAME }}"
3943
git pull
4044
41-
- name: Unit Tests
42-
run: npm run test:coverage
43-
env:
44-
CI: true
45-
4645
- name: Run ESLint and Prettier
4746
id: code-format
4847
run: |
4948
npm run clean:code
5049
git add .
51-
echo "::set-output name=formatted-files::$(git status -s -uno | wc -l)"
50+
echo "formatted-files=$(git status -s -uno | wc -l)" >> $GITHUB_OUTPUT
5251
53-
- name: Commit Changes
52+
- name: Commit Format
5453
if: steps.code-format.outputs.formatted-files > 0
5554
run: |
5655
git commit -m "refactor: 💡 Clean code" -a
@@ -60,26 +59,44 @@ jobs:
6059
run: |
6160
npm run build:storybook:beta
6261
git add .
63-
echo "::set-output name=generated-docs::$(git status -s -uno | wc -l)"
62+
echo "generated-docs=$(git status -s -uno | wc -l)" >> $GITHUB_OUTPUT
6463
65-
- name: Commit Changes
64+
- name: Commit Docs
6665
if: steps.generate-docs.outputs.generated-docs > 0
6766
run: |
6867
git commit -m "docs: ✏️ Updated StoryBook" -a
6968
69+
- name: Test runner
70+
id: test-runner
71+
run: |
72+
npx playwright install --with-deps
73+
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
74+
"npx http-server docs/beta --port 6006 --silent" \
75+
"npx wait-on tcp:127.0.0.1:6006 && npm run test:ci"
76+
echo "components-db=$(git status -s -uno | wc -l)" >> $GITHUB_OUTPUT
77+
78+
- name: Commit Database
79+
if: steps.test-runner.outputs.components-db > 0
80+
run: |
81+
git commit -m "docs: ✏️ Updated components database" -a
82+
7083
- name: Build
7184
run: npm run build
7285

7386
- name: Release
7487
env:
88+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
89+
GIT_AUTHOR_NAME: ${{ secrets.GIT_USER_NAME }}
90+
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
91+
GIT_COMMITTER_NAME: ${{ secrets.GIT_USER_NAME }}
7592
GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
7693
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7794
run: npx semantic-release
7895

7996
- name: Send Notification
8097
uses: Co-qn/google-chat-notification@master
8198
with:
82-
name: Mosaic CI - Release Beta
99+
name: ${{ github.workflow }}
83100
url: ${{ secrets.GOOGLE_CHAT }}
84101
status: ${{ job.status }}
85102
if: always()

.github/workflows/release.yml

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@ name: Mosaic CI - Release
33
on:
44
push:
55
branches:
6-
- master
6+
- main
7+
8+
concurrency:
9+
group: release
10+
cancel-in-progress: true
711

812
jobs:
913
release:
10-
runs-on: ubuntu-latest
11-
steps:
14+
runs-on: ubuntu-22.04
15+
steps:
1216
- name: Checkout
1317
uses: actions/checkout@v3
1418
with:
@@ -17,7 +21,7 @@ jobs:
1721
- name: Install NodeJS
1822
uses: actions/setup-node@v3
1923
with:
20-
node-version: lts/gallium
24+
node-version: lts/iron
2125

2226
- name: Cache Dependencies
2327
id: cache-dependencies
@@ -38,19 +42,14 @@ jobs:
3842
git config --local user.name "${{ secrets.GIT_USER_NAME }}"
3943
git pull
4044
41-
- name: Unit Tests
42-
run: npm run test:coverage
43-
env:
44-
CI: true
45-
4645
- name: Run ESLint and Prettier
4746
id: code-format
4847
run: |
4948
npm run clean:code
5049
git add .
51-
echo "::set-output name=formatted-files::$(git status -s -uno | wc -l)"
50+
echo "formatted-files=$(git status -s -uno | wc -l)" >> $GITHUB_OUTPUT
5251
53-
- name: Commit Changes
52+
- name: Commit Format
5453
if: steps.code-format.outputs.formatted-files > 0
5554
run: |
5655
git commit -m "refactor: 💡 Clean code" -a
@@ -60,26 +59,44 @@ jobs:
6059
run: |
6160
npm run build:storybook
6261
git add .
63-
echo "::set-output name=generated-docs::$(git status -s -uno | wc -l)"
62+
echo "generated-docs=$(git status -s -uno | wc -l)" >> $GITHUB_OUTPUT
6463
65-
- name: Commit Changes
64+
- name: Commit Docs
6665
if: steps.generate-docs.outputs.generated-docs > 0
6766
run: |
6867
git commit -m "docs: ✏️ Updated StoryBook" -a
6968
69+
- name: Test runner
70+
id: test-runner
71+
run: |
72+
npx playwright install --with-deps
73+
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
74+
"npx http-server docs/latest --port 6006 --silent" \
75+
"npx wait-on tcp:127.0.0.1:6006 && npm run test:ci"
76+
echo "components-db=$(git status -s -uno | wc -l)" >> $GITHUB_OUTPUT
77+
78+
- name: Commit Database
79+
if: steps.test-runner.outputs.components-db > 0
80+
run: |
81+
git commit -m "docs: ✏️ Updated components database" -a
82+
7083
- name: Build
7184
run: npm run build
7285

7386
- name: Release
7487
env:
88+
GIT_AUTHOR_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
89+
GIT_AUTHOR_NAME: ${{ secrets.GIT_USER_NAME }}
90+
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_USER_EMAIL }}
91+
GIT_COMMITTER_NAME: ${{ secrets.GIT_USER_NAME }}
7592
GITHUB_TOKEN: ${{ secrets.PA_TOKEN }}
7693
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
7794
run: npx semantic-release
7895

7996
- name: Send Notification
8097
uses: Co-qn/google-chat-notification@master
8198
with:
82-
name: Mosaic CI - Release
99+
name: ${{ github.workflow }}
83100
url: ${{ secrets.GOOGLE_CHAT }}
84101
status: ${{ job.status }}
85102
if: always()

.github/workflows/test.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ name: Mosaic CI - Test
33
on:
44
pull_request:
55
branches:
6-
- master
6+
- main
7+
8+
concurrency:
9+
group: test-${{ github.ref_name }}
10+
cancel-in-progress: true
711

812
jobs:
913
test:
@@ -20,7 +24,7 @@ jobs:
2024
- name: Install NodeJS
2125
uses: actions/setup-node@v3
2226
with:
23-
node-version: lts/gallium
27+
node-version: lts/iron
2428

2529
- name: Cache Dependencies
2630
id: cache-dependencies
@@ -34,8 +38,15 @@ jobs:
3438
- name: Install Dependencies
3539
if: steps.cache-dependencies.outputs.cache-hit != 'true'
3640
run: npm ci
37-
38-
- name: Unit Tests
39-
run: npm run test:coverage
40-
env:
41-
CI: true
41+
42+
- name: Generate Docs
43+
id: generate-docs
44+
run: |
45+
npm run build:storybook
46+
47+
- name: Test runner
48+
run: |
49+
npx playwright install --with-deps
50+
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
51+
"npx http-server docs/latest --port 6006 --silent" \
52+
"npx wait-on tcp:127.0.0.1:6006 && npm run test:ci"

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npx --no-install commitlint --edit $1

.husky/pre-commit

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
4-
npm run pre:commit
1+
npm run pre:commit

.husky/pre-push

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
#!/bin/sh
2-
. "$(dirname "$0")/_/husky.sh"
3-
41
npm run pre:push

.jest/config.ts

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

.jest/enzyme.ts

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

0 commit comments

Comments
 (0)