Skip to content

Commit de7f7d7

Browse files
authored
update workflows (#2639)
1 parent 32fa0c6 commit de7f7d7

Some content is hidden

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

69 files changed

+418
-464
lines changed

.github/composite-actions/install/action.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,20 @@ description: "Sets up Node.js and runs install"
44
runs:
55
using: composite
66
steps:
7+
# we use bun for some test suites
8+
- name: Setup bun
9+
uses: oven-sh/setup-bun@v1
10+
with:
11+
bun-version: 1.0.35
12+
# pnpm for our dependencies
713
- uses: pnpm/action-setup@v3
814
with:
915
version: 8
1016
- name: Setup Node.js
1117
uses: actions/setup-node@v4
1218
with:
1319
node-version: 20
20+
check-latest: true
1421
registry-url: "https://registry.npmjs.org"
1522
cache: "pnpm"
1623

.github/workflows/benchmark.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Benchmark
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
types: [opened, synchronize]
8+
# trigger on merge group as well (merge queue)
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
# To use Remote Caching, uncomment the next lines and follow the steps below.
16+
env:
17+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
18+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
19+
TW_SECRET_KEY: ${{ secrets.TW_SECRET_KEY }}
20+
21+
jobs:
22+
benchmark:
23+
timeout-minutes: 15
24+
name: "Benchmark"
25+
runs-on: ubuntu-latest-16
26+
steps:
27+
- name: Check out the code
28+
uses: actions/checkout@v4
29+
30+
- name: Setup & Install
31+
uses: ./.github/composite-actions/install
32+
33+
- name: Run benchmarks
34+
uses: CodSpeedHQ/action@v2
35+
with:
36+
token: ${{ secrets.CODSPEED_TOKEN }}
37+
run: "pnpm bench"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: E2E Tests (legacy)
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths: ["legacy_packages/**", "legacy_e2e/**"]
7+
pull_request:
8+
types: [opened, synchronize]
9+
paths: ["legacy_packages/**", "legacy_e2e/**"]
10+
# trigger on merge group as well (merge queue)
11+
merge_group:
12+
types: [checks_requested]
13+
branches: ["main"]
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
# To use Remote Caching, uncomment the next lines and follow the steps below.
21+
env:
22+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
23+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
24+
TW_SECRET_KEY: ${{ secrets.TW_SECRET_KEY }}
25+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
26+
27+
jobs:
28+
e2e:
29+
timeout-minutes: 15
30+
name: E2E Tests
31+
runs-on: ubuntu-latest-16
32+
steps:
33+
- name: Check out the code
34+
uses: actions/checkout@v4
35+
36+
- name: Setup & Install
37+
uses: ./.github/composite-actions/install
38+
39+
- name: Install Playwright
40+
run: npx playwright install --with-deps
41+
42+
- name: Run e2e tests
43+
run: pnpm e2e
44+
env:
45+
NODE_OPTIONS: "--max_old_space_size=4096"
46+
CLI_E2E_API_KEY: ${{ secrets.CLI_E2E_API_KEY }}

.github/workflows/lint.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
pull_request:
7+
types: [opened, synchronize]
8+
# trigger on merge group as well (merge queue)
9+
merge_group:
10+
types: [checks_requested]
11+
branches: ["main"]
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.ref }}
16+
cancel-in-progress: true
17+
18+
# To use Remote Caching, uncomment the next lines and follow the steps below.
19+
env:
20+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
21+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
22+
TW_SECRET_KEY: ${{ secrets.TW_SECRET_KEY }}
23+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
24+
25+
jobs:
26+
lint:
27+
timeout-minutes: 15
28+
name: Lint Packages
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Check out the code
32+
uses: actions/checkout@v4
33+
34+
- name: Setup & Install
35+
uses: ./.github/composite-actions/install
36+
37+
- run: pnpm lint
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Unit Tests (Legacy Packages)
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths: ["legacy_packages/**"]
7+
pull_request:
8+
types: [opened, synchronize]
9+
paths: ["legacy_packages/**"]
10+
# trigger on merge group as well (merge queue)
11+
merge_group:
12+
types: [checks_requested]
13+
branches: ["main"]
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
# To use Remote Caching, uncomment the next lines and follow the steps below.
21+
env:
22+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
23+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
24+
TW_SECRET_KEY: ${{ secrets.TW_SECRET_KEY }}
25+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
26+
27+
jobs:
28+
test:
29+
timeout-minutes: 15
30+
name: Unit Tests (Legacy)
31+
runs-on: ubuntu-latest-16
32+
steps:
33+
- name: Check out the code
34+
uses: actions/checkout@v4
35+
36+
- name: Setup & Install
37+
uses: ./.github/composite-actions/install
38+
39+
- run: pnpm test:legacy
40+
41+
- name: Upload coverage reports to Codecov
42+
uses: codecov/codecov-action@v4
43+
with:
44+
directory: ./legacy_packages

.github/workflows/unit-tests.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths: ["packages/**"]
7+
pull_request:
8+
types: [opened, synchronize]
9+
paths: ["packages/**"]
10+
# trigger on merge group as well (merge queue)
11+
merge_group:
12+
types: [checks_requested]
13+
branches: ["main"]
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
# To use Remote Caching, uncomment the next lines and follow the steps below.
21+
env:
22+
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
23+
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
24+
TW_SECRET_KEY: ${{ secrets.TW_SECRET_KEY }}
25+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
26+
27+
jobs:
28+
test:
29+
timeout-minutes: 15
30+
name: Unit Tests
31+
runs-on: ubuntu-latest-16
32+
steps:
33+
- name: Check out the code
34+
uses: actions/checkout@v4
35+
36+
- name: Setup & Install
37+
uses: ./.github/composite-actions/install
38+
39+
- name: Set up foundry
40+
uses: foundry-rs/foundry-toolchain@v1
41+
42+
- run: pnpm test
43+
44+
- name: Upload coverage reports to Codecov
45+
uses: codecov/codecov-action@v4
46+
with:
47+
directory: ./packages

0 commit comments

Comments
 (0)