Skip to content

Commit c111314

Browse files
committed
Update action
1 parent 9f512c3 commit c111314

2 files changed

Lines changed: 151 additions & 100 deletions

File tree

.github/workflows/publish.yml

Lines changed: 150 additions & 99 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,145 @@
1-
name: Publish Package to npm
2-
3-
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- main
10-
permissions: write-all
11-
12-
concurrency:
13-
group: ${{ github.workflow }}-${{ github.ref }}
14-
cancel-in-progress: false
15-
16-
jobs:
17-
benchmark:
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v5
22-
23-
- uses: actions-rust-lang/setup-rust-toolchain@v1
24-
- name: Cargo tarpaulin and fmt
25-
run: |
26-
cargo install cargo-tarpaulin
27-
rustup component add rustfmt clippy
28-
- uses: oven-sh/setup-bun@v2
29-
name: Install bun
30-
31-
- uses: jetli/wasm-pack-action@v0.4.0
32-
with:
33-
version: 'latest'
34-
- name: Install Node.js
35-
uses: actions/setup-node@v4
36-
with:
37-
registry-url: "https://registry.npmjs.org"
38-
node-version: 22
39-
- run: bun install
40-
- run: bun run build
41-
- name: Benchmark
42-
run: bun run benchmark
43-
44-
publish:
45-
runs-on: ubuntu-latest
46-
steps:
47-
- name: Checkout
48-
uses: actions/checkout@v5
49-
50-
- uses: actions-rust-lang/setup-rust-toolchain@v1
51-
- name: Cargo tarpaulin and fmt
52-
run: |
53-
cargo install cargo-tarpaulin
54-
rustup component add rustfmt clippy
55-
- uses: oven-sh/setup-bun@v2
56-
name: Install bun
57-
58-
- uses: jetli/wasm-pack-action@v0.4.0
59-
with:
60-
version: 'latest'
61-
- name: Install Node.js
62-
uses: actions/setup-node@v4
63-
with:
64-
registry-url: "https://registry.npmjs.org"
65-
node-version: 22
66-
env:
67-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
68-
- run: bun install
69-
- run: bun run build
70-
- run: |
71-
bun run lint
72-
# rust coverage issue
73-
echo 'max_width = 100000' > .rustfmt.toml
74-
echo 'tab_spaces = 4' >> .rustfmt.toml
75-
echo 'newline_style = "Unix"' >> .rustfmt.toml
76-
echo 'fn_call_width = 100000' >> .rustfmt.toml
77-
echo 'fn_params_layout = "Compressed"' >> .rustfmt.toml
78-
echo 'chain_width = 100000' >> .rustfmt.toml
79-
echo 'merge_derives = true' >> .rustfmt.toml
80-
echo 'use_small_heuristics = "Default"' >> .rustfmt.toml
81-
cargo fmt
82-
- run: bun run test
83-
- name: Format Rollback
84-
run: |
85-
rm -rf .rustfmt.toml
86-
cargo fmt
1+
name: Publish Package to npm
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
permissions: write-all
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: false
15+
16+
jobs:
17+
benchmark:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v6
22+
23+
- uses: actions-rust-lang/setup-rust-toolchain@v1
24+
25+
- name: Cache cargo registry + target
26+
uses: actions/cache@v5
27+
with:
28+
path: |
29+
~/.cargo/registry/index/
30+
~/.cargo/registry/cache/
31+
~/.cargo/git/db/
32+
target/
33+
key: cargo-benchmark-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
34+
restore-keys: |
35+
cargo-benchmark-${{ runner.os }}-
36+
37+
- uses: oven-sh/setup-bun@v2
38+
name: Install bun
39+
40+
- name: Cache bun dependencies
41+
uses: actions/cache@v5
42+
with:
43+
path: ~/.bun/install/cache
44+
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
45+
restore-keys: |
46+
bun-${{ runner.os }}-
47+
48+
- uses: jetli/wasm-pack-action@v0.4.0
49+
with:
50+
version: 'latest'
51+
- name: Install Node.js
52+
uses: actions/setup-node@v4
53+
with:
54+
registry-url: "https://registry.npmjs.org"
55+
node-version: 22
56+
- run: bun install
57+
- run: bun run build
58+
- name: Benchmark
59+
run: bun run benchmark
60+
61+
publish:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- name: Checkout
65+
uses: actions/checkout@v6
66+
67+
- uses: actions-rust-lang/setup-rust-toolchain@v1
68+
69+
- name: Cache cargo registry + target
70+
uses: actions/cache@v5
71+
with:
72+
path: |
73+
~/.cargo/registry/index/
74+
~/.cargo/registry/cache/
75+
~/.cargo/git/db/
76+
target/
77+
key: cargo-publish-${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
78+
restore-keys: |
79+
cargo-publish-${{ runner.os }}-
80+
81+
- name: Install cargo-binstall
82+
run: curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
83+
84+
- name: Install cargo-tarpaulin
85+
run: cargo binstall cargo-tarpaulin --no-confirm
86+
87+
- name: Install Rust components
88+
run: rustup component add rustfmt clippy
89+
90+
- uses: oven-sh/setup-bun@v2
91+
name: Install bun
92+
93+
- name: Cache bun dependencies
94+
uses: actions/cache@v5
95+
with:
96+
path: ~/.bun/install/cache
97+
key: bun-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
98+
restore-keys: |
99+
bun-${{ runner.os }}-
100+
101+
- uses: jetli/wasm-pack-action@v0.4.0
102+
with:
103+
version: 'latest'
104+
- name: Install Node.js
105+
uses: actions/setup-node@v4
106+
with:
107+
registry-url: "https://registry.npmjs.org"
108+
node-version: 22
109+
env:
110+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
111+
- run: bun install
112+
- run: bun run build
113+
- run: |
114+
bun run lint
115+
# rust coverage issue
116+
echo 'max_width = 100000' > .rustfmt.toml
117+
echo 'tab_spaces = 4' >> .rustfmt.toml
118+
echo 'newline_style = "Unix"' >> .rustfmt.toml
119+
echo 'fn_call_width = 100000' >> .rustfmt.toml
120+
echo 'fn_params_layout = "Compressed"' >> .rustfmt.toml
121+
echo 'chain_width = 100000' >> .rustfmt.toml
122+
echo 'merge_derives = true' >> .rustfmt.toml
123+
echo 'use_small_heuristics = "Default"' >> .rustfmt.toml
124+
cargo fmt
125+
- run: bun run test
126+
- name: Format Rollback
127+
run: |
128+
rm -rf .rustfmt.toml
129+
cargo fmt
87130
- name: Build Landing
88131
run: |
89132
bun run --filter @devup-ui/components build-storybook
90133
mv ./packages/components/storybook-static ./apps/landing/public/storybook
91134
bun run --filter landing build
135+
- name: Cache Playwright Browsers
136+
id: playwright-cache
137+
uses: actions/cache@v5
138+
with:
139+
path: ~/.cache/ms-playwright
140+
key: playwright-${{ runner.os }}-${{ hashFiles('**/bun.lock') }}
141+
restore-keys: |
142+
playwright-${{ runner.os }}-
92143
- name: Install Playwright Browsers
93144
run: bunx playwright install chromium --with-deps
94145
- name: Check for Existing E2E Snapshots
@@ -128,16 +179,16 @@ jobs:
128179
name: playwright-report-singlecss
129180
path: playwright-report/
130181
retention-days: 30
131-
- name: Upload to codecov.io
132-
uses: codecov/codecov-action@v5
133-
with:
134-
token: ${{ secrets.CODECOV_TOKEN }}
135-
fail_ci_if_error: true
136-
files: ./coverage/lcov.info
137-
138-
- uses: changepacks/action@main
139-
id: changepacks
140-
with:
141-
publish: true
142-
env:
143-
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}
182+
- name: Upload to codecov.io
183+
uses: codecov/codecov-action@v5
184+
with:
185+
token: ${{ secrets.CODECOV_TOKEN }}
186+
fail_ci_if_error: true
187+
files: ./coverage/lcov.info
188+
189+
- uses: changepacks/action@main
190+
id: changepacks
191+
with:
192+
publish: true
193+
env:
194+
NPM_CONFIG_TOKEN: ${{ secrets.NPM_TOKEN }}

playwright.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default defineConfig({
77
fullyParallel: true,
88
forbidOnly: !!process.env.CI,
99
retries: process.env.CI ? 2 : 0,
10-
workers: process.env.CI ? 1 : 4,
10+
workers: process.env.CI ? 2 : 4,
1111
reporter: 'html',
1212
timeout: 60_000,
1313
expect: {

0 commit comments

Comments
 (0)