-
-
Notifications
You must be signed in to change notification settings - Fork 18
60 lines (53 loc) · 1.59 KB
/
ci.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
name: CI
on: [push, pull_request]
permissions:
contents: write
pull-requests: write
jobs:
build-and-test:
name: Build and test
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout git repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "yarn"
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies with Yarn
run: yarn install --immutable
- name: Build and test
run: yarn just build lint test size
legacy-test:
name: Legacy Node.js tests
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout git repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "lts/*"
cache: "yarn"
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies with Yarn
run: yarn install --immutable
- name: Build
run: yarn just bundle
- name: Download Node.js v0.9.1
run: |
wget https://nodejs.org/dist/v0.9.1/node-v0.9.1-linux-x64.tar.gz
tar xf node-v0.9.1-linux-x64.tar.gz
mkdir -p $HOME/.local/bin
cp ./node-v0.9.1-linux-x64/bin/node $HOME/.local/bin/node-0.9.1
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Run tests on modern Node.js
run: node ./test/legacy.cjs
- name: Run tests on Node.js v0.9.1
run: node-0.9.1 ./test/legacy.cjs