Skip to content

Commit ffd2be4

Browse files
authored
Merge branch 'release/2' into 8008-fix-clear-selection-single-select
2 parents 9ecd26e + 58b8714 commit ffd2be4

File tree

1,178 files changed

+13766
-7526
lines changed

Some content is hidden

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

1,178 files changed

+13766
-7526
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Benchmark Execution
2+
runs:
3+
using: 'composite'
4+
steps:
5+
- name: Install dependencies
6+
uses: ./.github/actions/pnpm-setup
7+
8+
- name: Build required packages
9+
run: pnpm build:deps
10+
shell: bash
11+
working-directory: packages/tools/benchmark-tests
12+
13+
- name: Run benchmark tests
14+
run: pnpm test-benchmark
15+
shell: bash
16+
working-directory: packages/tools/benchmark-tests
Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
1-
# References:
2-
# - https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data
3-
# - https://github.com/pnpm/action-setup
4-
51
name: pnpm Setup
6-
description: Install Node and pnpm, install dependencies
72
runs:
83
using: 'composite'
9-
steps:
10-
- uses: pnpm/action-setup@v4
4+
steps: # https://pnpm.io/continuous-integration#github-actions
5+
- name: Install pnpm
6+
uses: pnpm/action-setup@v4
117
with:
128
version: 10
13-
run_install: false
14-
15-
- uses: actions/setup-node@v4
9+
- name: Use Node.js
10+
uses: actions/setup-node@v4
1611
with:
17-
node-version: '20'
12+
node-version: 22
1813
cache: 'pnpm'
19-
20-
- run: pnpm install
14+
- name: Install dependencies
15+
run: pnpm install
2116
shell: bash
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Upload Reports
2+
inputs:
3+
name:
4+
default: 'reports'
5+
required: false
6+
runs:
7+
using: 'composite'
8+
steps:
9+
- name: Upload test reports
10+
uses: actions/upload-artifact@v4
11+
with:
12+
name: ${{ inputs.name }}
13+
path: |
14+
packages/**/playwright-report/
15+
packages/**/test-results/**/*.png
16+
packages/**/test-results/axe-default/**

.github/dod.yml

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Benchmark-Baseline
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency:
7+
group: 'workflow-${{ github.workflow }}-${{ github.ref }}'
8+
cancel-in-progress: true
9+
10+
jobs:
11+
benchmark:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Create GitHub App Token
15+
uses: actions/create-github-app-token@v2
16+
id: app-token
17+
with:
18+
app-id: ${{ secrets.APP_ID }}
19+
private-key: ${{ secrets.PRIVATE_KEY }}
20+
21+
- name: Get GitHub App User ID
22+
id: get-user-id
23+
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
24+
env:
25+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
26+
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
fetch-depth: 0
31+
token: ${{ steps.app-token.outputs.token }}
32+
33+
- name: Install and execute benchmark
34+
uses: ./.github/actions/benchmark
35+
36+
- name: Remove husky
37+
run: rm -rf .husky
38+
shell: bash
39+
40+
- name: Copy result as new baseline
41+
run: cp packages/tools/benchmark-tests/benchmark-result.json packages/tools/benchmark-tests/benchmark-baseline.json
42+
43+
- name: Commit and push updated baseline
44+
uses: stefanzweifel/git-auto-commit-action@v5
45+
with:
46+
commit_message: 'chore: update benchmark-baseline.json [ci skip]'
47+
file_pattern: 'packages/tools/benchmark-tests/benchmark-baseline.json'
48+
commit_user_name: '${{ steps.app-token.outputs.app-slug }}[bot]'
49+
commit_user_email: '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Benchmark-Monitoring
2+
3+
on:
4+
push:
5+
branches:
6+
- release/2
7+
8+
concurrency:
9+
group: 'workflow-${{ github.workflow }}-${{ github.ref }}'
10+
cancel-in-progress: true
11+
12+
jobs:
13+
benchmark:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Create GitHub App Token
17+
uses: actions/create-github-app-token@v2
18+
id: app-token
19+
with:
20+
app-id: ${{ secrets.APP_ID }}
21+
private-key: ${{ secrets.PRIVATE_KEY }}
22+
23+
- name: Get GitHub App User ID
24+
id: get-user-id
25+
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
26+
env:
27+
GH_TOKEN: ${{ steps.app-token.outputs.token }}
28+
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
token: ${{ steps.app-token.outputs.token }}
34+
35+
- name: Install and execute benchmark
36+
uses: ./.github/actions/benchmark
37+
38+
- name: Git checkout readme's
39+
run: git checkout -- packages/components/src
40+
shell: bash
41+
42+
- name: Remove husky
43+
run: rm -rf .husky
44+
shell: bash
45+
46+
- name: Store benchmark result
47+
uses: rhysd/github-action-benchmark@v1
48+
with:
49+
alert-threshold: 10%
50+
auto-push: true
51+
fail-threshold: 25%
52+
gh-pages-branch: benchmarks
53+
github-token: ${{ secrets.GITHUB_TOKEN }}
54+
output-file-path: packages/tools/benchmark-tests/benchmark-result.json
55+
tool: customSmallerIsBetter
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Benchmark-PR-Check
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: 'workflow-${{ github.workflow }}-${{ github.ref }}'
8+
cancel-in-progress: true
9+
10+
jobs:
11+
benchmark:
12+
# Skip this job when the base clone URL may be different from the head clone URL.
13+
if: github.event.pull_request.head.repo.fork == false
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
with:
18+
fetch-depth: 0
19+
persist-credentials: true
20+
21+
- name: Install and execute benchmark
22+
uses: ./.github/actions/benchmark
23+
24+
- name: Compare benchmark with baseline
25+
run: node scripts/compare-benchmark.mjs
26+
working-directory: packages/tools/benchmark-tests
27+
28+
- name: Find comment
29+
uses: peter-evans/find-comment@v3
30+
id: fc
31+
with:
32+
body-includes: Hydration Benchmark Report
33+
comment-author: 'github-actions[bot]'
34+
issue-number: ${{ github.event.pull_request.number }}
35+
36+
- name: Post PR Comment
37+
uses: peter-evans/create-or-update-comment@v4
38+
with:
39+
body-path: packages/tools/benchmark-tests/benchmark-report.md
40+
comment-id: ${{ steps.fc.outputs.comment-id }}
41+
edit-mode: replace
42+
issue-number: ${{ github.event.pull_request.number }}

.github/workflows/ci.yml

Lines changed: 45 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -9,90 +9,83 @@ on:
99
- 'release/*'
1010
workflow_dispatch:
1111

12+
concurrency:
13+
group: 'workflow-${{ github.workflow }}-${{ github.ref }}'
14+
cancel-in-progress: true
15+
1216
jobs:
1317
build-and-check:
18+
continue-on-error: true
1419
runs-on: ubuntu-latest
1520
steps:
16-
- uses: actions/checkout@v4
21+
- name: Checkout
22+
uses: actions/checkout@v4
1723
with:
1824
fetch-depth: 0
1925
persist-credentials: false
2026
- uses: ./.github/actions/pnpm-setup
21-
2227
- name: Build
2328
run: pnpm -r build
24-
25-
- name: Unused
26-
run: pnpm -r --parallel unused
27-
28-
- name: Lint
29-
run: pnpm -r --parallel lint
30-
3129
- name: Format
3230
run: pnpm -r --parallel format
31+
- name: Lint
32+
run: pnpm -r --parallel lint
33+
- name: Unit Tests
34+
run: pnpm -r --parallel test:unit
35+
- name: Unused
36+
run: pnpm -r --parallel unused
3337

34-
test:
38+
e2e-tests:
39+
continue-on-error: true
3540
runs-on: ubuntu-latest
3641
steps:
37-
- uses: actions/checkout@v4
42+
- name: Checkout
43+
uses: actions/checkout@v4
3844
with:
3945
fetch-depth: 0
4046
persist-credentials: false
4147
- uses: ./.github/actions/pnpm-setup
42-
43-
- name: Install Playwright Browsers
44-
run: pnpm --filter @public-ui/components exec playwright install --with-deps
45-
46-
- name: Build
47-
run: pnpm --filter @public-ui/sample-react^... build
48-
49-
- name: Unit Tests
50-
run: pnpm -r test:unit
51-
52-
# Tests in sample app are currently failing and hence disabled.
53-
# Remove `--filter @public-ui/components` after tests have been fixed in #7003.
48+
# Tests in sample app are currently failing and hence disabled.
49+
# Remove `--filter @public-ui/components` after tests have been fixed in #7003.
5450
- name: E2E Test
5551
run: pnpm --filter @public-ui/components test:e2e
56-
57-
- uses: actions/upload-artifact@v4
52+
- uses: ./.github/actions/upload-reports
5853
if: failure()
59-
name: Upload test reports
6054
with:
61-
name: reports
62-
path: |
63-
packages/themes/**/test-results/**/*.png
64-
packages/test-tag-name-transformer/test-results/**/*.png
65-
packages/components/playwright-report/
66-
!**/node_modules
55+
name: report-e2e
6756

68-
test-visual:
69-
runs-on: ubuntu-latest
57+
visual-tests:
58+
continue-on-error: true
7059
strategy:
7160
matrix:
72-
package: ['@public-ui/test-tag-name-transformer', '@public-ui/theme-default', '@public-ui/theme-bwst']
61+
package: ['test-tag-name-transformer', 'theme-default', 'theme-bwst']
62+
runs-on: ubuntu-latest
7363
steps:
74-
- uses: actions/checkout@v4
64+
- name: Checkout
65+
uses: actions/checkout@v4
7566
with:
7667
fetch-depth: 0
7768
persist-credentials: false
7869
- uses: ./.github/actions/pnpm-setup
79-
80-
- name: Install Playwright Browsers
81-
run: pnpm --filter @public-ui/components exec playwright install --with-deps
82-
8370
- name: Build
84-
run: pnpm -r build
85-
71+
run: pnpm --filter @public-ui/sample-react^... build
8672
- name: Visual Tests
87-
run: pnpm --filter=${{ matrix.package }} test:visual
88-
89-
- uses: actions/upload-artifact@v4
73+
run: pnpm --filter=@public-ui/${{ matrix.package }} test
74+
- uses: ./.github/actions/upload-reports
9075
if: failure()
91-
name: Upload test reports
9276
with:
93-
name: reports
94-
path: |
95-
packages/themes/**/test-results/**/*.png
96-
packages/test-tag-name-transformer/test-results/**/*.png
97-
packages/components/playwright-report/
98-
!**/node_modules
77+
name: report-${{ matrix.package }}
78+
79+
check-results:
80+
runs-on: ubuntu-latest
81+
needs: [build-and-check, e2e-tests, visual-tests]
82+
if: always()
83+
steps:
84+
- name: Fail if any job failed
85+
run: |
86+
if [[ "${{ needs.build-and-check.result }}" == "failure" || \
87+
"${{ needs.e2e-tests.result }}" == "failure" || \
88+
"${{ needs.visual-tests.result }}" == "failure" ]]; then
89+
echo "At least one job failed"
90+
exit 1
91+
fi

.github/workflows/cla.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
pull_request_target:
77
types: [opened, closed, synchronize]
88

9+
concurrency:
10+
group: 'workflow-${{ github.workflow }}-${{ github.ref }}'
11+
cancel-in-progress: true
12+
913
jobs:
1014
cla:
1115
if: github.repository == 'public-ui/kolibri'
@@ -17,7 +21,7 @@ jobs:
1721
with:
1822
app-id: ${{ secrets.APP_ID }}
1923
private-key: ${{ secrets.PRIVATE_KEY }}
20-
repositories: "kolibri,.github-private"
24+
repositories: 'kolibri,.github-private'
2125

2226
- name: 'CLA Assistant'
2327
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'

0 commit comments

Comments
 (0)