11
11
steps :
12
12
- name : Checkout Repo
13
13
uses : actions/checkout@v4
14
+ - run : |
15
+ sudo apt-get update
16
+ sudo apt-get install libstdc++-12-dev
17
+ - name : Install latest
18
+ uses : moonrepo/setup-rust@v1
19
+ with :
20
+ targets : wasm32-unknown-unknown
21
+ channel : nightly
22
+ - name : Install wasm-pack
23
+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
14
24
- uses : pnpm/action-setup@v2
15
25
with :
16
26
version : 8
23
33
run : pnpm install --frozen-lockfile
24
34
- name : Build
25
35
run : pnpm run build
36
+ - uses : actions/upload-artifact@v4
37
+ with :
38
+ name : dist
39
+ path : dist
26
40
test_nodejs :
27
41
runs-on : ubuntu-latest
28
42
strategy :
@@ -40,20 +54,29 @@ jobs:
40
54
with :
41
55
node-version : ${{ matrix.node-version }}
42
56
cache : pnpm
57
+ - name : Install latest
58
+ uses : moonrepo/setup-rust@v1
59
+ with :
60
+ targets : wasm32-unknown-unknown
61
+ channel : nightly
62
+ - name : Install wasm-pack
63
+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
43
64
- run : pnpm install --frozen-lockfile
44
65
- run : pnpm run build
45
66
- run : pnpm test run
46
67
47
68
test_deno :
48
69
runs-on : ubuntu-latest
70
+ needs : build
49
71
steps :
50
72
- uses : actions/checkout@v3
73
+ - uses : actions/download-artifact@v4
51
74
- uses : denoland/setup-deno@v1
52
75
with :
53
76
deno-version : v1.x
54
77
- run : |
55
78
deno eval '
56
- import { parse } from "./src/ web-csv-toolbox.ts ";
79
+ import { parse } from "./dist/es/ web-csv-toolbox.js ";
57
80
58
81
const csv = `name,age
59
82
Alice,42
73
96
- firefox
74
97
steps :
75
98
- uses : actions/checkout@v3
99
+ - run : |
100
+ sudo apt-get update
101
+ sudo apt-get install libstdc++-12-dev
102
+ - name : Install latest
103
+ uses : moonrepo/setup-rust@v1
104
+ with :
105
+ targets : wasm32-unknown-unknown
106
+ channel : nightly
107
+ - name : Install wasm-pack
108
+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
76
109
- uses : pnpm/action-setup@v2
77
110
with :
78
111
version : 8
@@ -97,6 +130,13 @@ jobs:
97
130
# - safari
98
131
steps :
99
132
- uses : actions/checkout@v3
133
+ - name : Install latest
134
+ uses : moonrepo/setup-rust@v1
135
+ with :
136
+ targets : wasm32-unknown-unknown
137
+ channel : nightly
138
+ - name : Install wasm-pack
139
+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
100
140
- uses : pnpm/action-setup@v2
101
141
with :
102
142
version : 8
@@ -121,6 +161,13 @@ jobs:
121
161
- edge
122
162
steps :
123
163
- uses : actions/checkout@v3
164
+ - name : Install latest
165
+ uses : moonrepo/setup-rust@v1
166
+ with :
167
+ targets : wasm32-unknown-unknown
168
+ channel : nightly
169
+ - name : Install wasm-pack
170
+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
124
171
- uses : pnpm/action-setup@v2
125
172
with :
126
173
version : 8
@@ -129,10 +176,12 @@ jobs:
129
176
with :
130
177
node-version : 20
131
178
cache : pnpm
179
+ - name : Install wasm-pack
180
+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
132
181
- run : pnpm install --frozen-lockfile
133
182
- run : pnpm test run -- --browser.name=${{ matrix.browsers }} --browser.headless
134
183
135
- check :
184
+ check_nodejs :
136
185
name : Check
137
186
runs-on : ubuntu-latest
138
187
permissions :
@@ -152,3 +201,28 @@ jobs:
152
201
run : pnpm install --frozen-lockfile
153
202
- name : Check
154
203
run : npx biome ci .
204
+ check_rust :
205
+ name : Check Rust
206
+ runs-on : ubuntu-latest
207
+ permissions :
208
+ contents : read
209
+ steps :
210
+ - name : Checkout Repo
211
+ uses : actions/checkout@v4
212
+ - run : |
213
+ sudo apt-get update
214
+ sudo apt-get install libstdc++-12-dev
215
+ - name : Install latest
216
+ uses : moonrepo/setup-rust@v1
217
+ with :
218
+ targets : wasm32-unknown-unknown
219
+ channel : nightly
220
+ components : clippy,rustfmt
221
+ - name : Install wasm-pack
222
+ run : curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
223
+ - name : Run Clippy
224
+ run : cargo clippy --manifest-path=./web-csv-toolbox-wasm/Cargo.toml --all-targets --all-features
225
+ env :
226
+ RUSTFLAGS : -D warnings
227
+ - name : Run Fmt
228
+ run : cargo fmt --manifest-path=./web-csv-toolbox-wasm/Cargo.toml --all -- --check
0 commit comments