-
Notifications
You must be signed in to change notification settings - Fork 3
149 lines (115 loc) · 2.99 KB
/
pull_request.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: pull_request
on:
pull_request:
branches:
- master
- 1.9.x
- 1.8.x
- 1.7.x
- 1.6.x
- 1.5.x
- 1.4.x
- 1.3.x
- 1.2.x
- 1.1.x
- 1.0.x
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- name: Run actions/setup-node@v4
uses: actions/setup-node@v4
with:
node-version: "20"
registry-url: https://registry.npmjs.org/
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: installing
run: npm ci
- name: setup
run: npm run setup
- name: testing wasm
run: npm run test:rs -- --node
- name: building
run: npm run build
- uses: actions/upload-artifact@master
with:
name: lib
path: lib/
test_node:
runs-on: ubuntu-20.04
needs: build
strategy:
matrix:
version: ["20", "21"]
steps:
- uses: actions/checkout@v4
- name: Run actions/setup-node@v4 (${{ matrix.version }})
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.version }}
registry-url: https://registry.npmjs.org/
- uses: actions/download-artifact@v4
with:
name: lib
path: lib
- name: checking builded files
run: |
node lib/commonjs.cjs
node lib/esm.mjs
- name: running tests
run: |
node --test test/node.test.cjs
node --test test/node.test.mjs
test_bun:
runs-on: ubuntu-20.04
needs: build
strategy:
matrix:
version: ["1.0", "1.1"]
steps:
- uses: actions/checkout@v4
- name: Run oven-sh/setup-bun@v1 (${{ matrix.version }})
uses: oven-sh/setup-bun@v1
with:
bun-version: ${{ matrix.version }}
- uses: actions/download-artifact@v4
with:
name: lib
path: lib
- name: checking builded files
run: |
bun lib/commonjs.cjs
bun lib/esm.mjs
- name: testing builded files
run: |
bun test test/bun.test.cjs
bun test test/bun.test.mjs
test_deno:
runs-on: ubuntu-20.04
needs: build
strategy:
matrix:
version: ["v1.x"]
steps:
- uses: actions/checkout@v4
- name: Run denoland/setup-deno@v1 (${{ matrix.version }})
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.version }}
- uses: actions/download-artifact@v4
with:
name: lib
path: lib
- name: checking builded files
run: deno run --allow-read=lib/rregex.wasm lib/mod.js
- name: testing builded files
run: deno test --allow-read=lib/rregex.wasm test/deno.test.mjs