Skip to content

Commit cf769d3

Browse files
authored
ci: Update actions (jantimon#35)
1 parent a743353 commit cf769d3

File tree

3 files changed

+44
-60
lines changed

3 files changed

+44
-60
lines changed

.github/workflows/docs.yml

+22-23
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,35 @@ name: docs
33
on:
44
push:
55
branches:
6-
- main
6+
- main
77
paths:
8-
- 'docs/**'
9-
- '.github/workflows/docs.yml'
8+
- "docs/**"
9+
- ".github/workflows/docs.yml"
1010

1111
jobs:
1212
deploy:
13-
1413
runs-on: ubuntu-latest
1514

1615
strategy:
1716
matrix:
18-
node-version: [16.x]
17+
node-version: [20]
1918

2019
steps:
21-
- uses: actions/checkout@v2
22-
- name: Use Node.js ${{ matrix.node-version }}
23-
uses: actions/setup-node@v2
24-
with:
25-
node-version: ${{ matrix.node-version }}
26-
- name: RustUp
27-
run: rustup target add wasm32-wasi
28-
- run: npm install
29-
- run: (cd docs && npm install)
30-
- run: npm run prepublishOnly
31-
env:
32-
CI: true
33-
- run: npm run docs
34-
- name: Deploy
35-
uses: peaceiris/actions-gh-pages@v3
36-
with:
37-
github_token: ${{ secrets.GITHUB_TOKEN }}
38-
publish_dir: ./docs/out
20+
- uses: actions/checkout@v4
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
- name: RustUp
26+
run: rustup target add wasm32-wasi
27+
- run: npm install
28+
- run: (cd docs && npm install)
29+
- run: npm run prepublishOnly
30+
env:
31+
CI: true
32+
- run: npm run docs
33+
- name: Deploy
34+
uses: peaceiris/actions-gh-pages@v3
35+
with:
36+
github_token: ${{ secrets.GITHUB_TOKEN }}
37+
publish_dir: ./docs/out

.github/workflows/e2e-test.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,22 @@ on: [push]
44

55
jobs:
66
build:
7-
87
runs-on: ubuntu-latest
98

109
strategy:
1110
matrix:
1211
node-version: [20]
1312

1413
steps:
15-
- uses: actions/checkout@v2
16-
- name: Use Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v3
18-
with:
19-
node-version: ${{ matrix.node-version }}
20-
- run: npm install
21-
- run: npm run build
22-
- run: npm test
23-
env:
24-
CI: true
25-
- run: npx bundlesize -f dist/index.min.mjs
14+
- uses: actions/checkout@v4
15+
- name: Use Node.js ${{ matrix.node-version }}
16+
uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ matrix.node-version }}
19+
- run: npm install
20+
- run: npm run build
21+
- run: npm test
22+
env:
23+
CI: true
24+
NODE_OPTIONS: --openssl-legacy-provider
25+
- run: npx bundlesize -f dist/index.min.mjs

.github/workflows/swc.yml

+10-25
Original file line numberDiff line numberDiff line change
@@ -15,36 +15,21 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout sources
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
1919
- name: Install stable toolchain
20-
uses: actions-rs/toolchain@v1
21-
with:
22-
profile: minimal
23-
toolchain: stable
20+
uses: dtolnay/rust-toolchain@stable
2421
- name: Enable caching
2522
uses: Swatinem/rust-cache@v2
2623
with:
2724
workspaces: swc
2825
- name: Run cargo check
29-
uses: actions-rs/cargo@v1
30-
with:
31-
command: check
32-
args: --manifest-path swc/Cargo.toml
26+
run: cargo check --manifest-path swc/Cargo.toml
3327
- name: Run cargo test
34-
uses: actions-rs/cargo@v1
35-
with:
36-
command: test
37-
args: --manifest-path swc/Cargo.toml
28+
run: cargo test --manifest-path swc/Cargo.toml
3829
- name: Run cargo fmt
39-
uses: actions-rs/cargo@v1
40-
with:
41-
command: fmt
42-
args: --manifest-path swc/Cargo.toml --all -- --check
30+
run: cargo fmt --manifest-path swc/Cargo.toml --all -- --check
4331
- name: Run cargo clippy
44-
uses: actions-rs/cargo@v1
45-
with:
46-
command: clippy
47-
args: --manifest-path swc/Cargo.toml -- -D warnings
32+
run: cargo clippy --manifest-path swc/Cargo.toml -- -D warnings
4833

4934
wasm:
5035
name: Wasm plugin tests
@@ -55,17 +40,17 @@ jobs:
5540
runs-on: ${{ matrix.os }}
5641
steps:
5742
- name: Checkout sources
58-
uses: actions/checkout@v3
43+
uses: actions/checkout@v4
5944
- name: Add wasm32-wasi target
6045
run: rustup target add wasm32-wasi
6146
- name: Enable caching
6247
uses: Swatinem/rust-cache@v2
6348
with:
6449
workspaces: swc
65-
- name: Use Node.js 16
66-
uses: actions/setup-node@v3
50+
- name: Use Node.js 20
51+
uses: actions/setup-node@v4
6752
with:
68-
node-version: 16
53+
node-version: 20
6954
- name: Install NPM dependencies
7055
run: npm i
7156
- name: Build JS

0 commit comments

Comments
 (0)