1
+ on :
2
+ push :
3
+ branches : [main]
4
+ pull_request :
5
+ branches : [main]
6
+ workflow_dispatch : {}
7
+
8
+ name : Test
9
+
10
+ jobs :
11
+ host_tests :
12
+ strategy :
13
+ matrix :
14
+ # os: [macos-latest, windows-2019]
15
+ os : ['ubuntu-latest']
16
+ node : [16.20.1, 18.x, 20.x, 22.x]
17
+ runs-on : ${{ matrix.os }}
18
+ steps :
19
+ - uses : actions/checkout@v4
20
+
21
+ - uses : actions/setup-node@v4
22
+ with :
23
+ node-version : ${{ matrix.node }}
24
+ cache : ' npm'
25
+ registry-url : ' https://registry.npmjs.org'
26
+
27
+ - name : Build with Node.js ${{ matrix.node }} on ${{ matrix.os }}
28
+ run : npm install && npm run compile
29
+ shell : bash
30
+
31
+ - name : Test ${{ matrix.os }}
32
+ shell : bash
33
+ run : npm test
34
+
35
+ # container_tests:
36
+ # runs-on: ubuntu-latest
37
+ # strategy:
38
+ # matrix:
39
+ # linux_arch: [s390x, arm64, amd64]
40
+ # node: [16.x, 18.x, 20.x, 22.x]
41
+ # steps:
42
+ # - uses: actions/checkout@v4
43
+
44
+ # - uses: actions/setup-node@v4
45
+ # with:
46
+ # node-version: ${{ matrix.node }}
47
+
48
+ # - name: Get Full Node.js Version
49
+ # id: get_nodejs_version
50
+ # shell: bash
51
+ # run: |
52
+ # echo "version=$(node --print 'process.version.slice(1)')" >> "$GITHUB_OUTPUT"
53
+ # echo "ubuntu_version=$(node --print '(+process.version.slice(1).split(`.`).at(0)) > 16 ? `noble` : `bionic`')" >> "$GITHUB_OUTPUT"
54
+
55
+ # - name: Set up QEMU
56
+ # uses: docker/setup-qemu-action@v3
57
+
58
+ # - name: Set up Docker Buildx
59
+ # uses: docker/setup-buildx-action@v3
60
+
61
+ # - name: Run Buildx
62
+ # run: |
63
+ # docker buildx create --name builder --bootstrap --use
64
+ # docker buildx build \
65
+ # --platform linux/${{ matrix.linux_arch }} \
66
+ # --build-arg="NODE_ARCH=${{ matrix.linux_arch == 'amd64' && 'x64' || matrix.linux_arch }}" \
67
+ # --build-arg="NODE_VERSION=${{ steps.get_nodejs_version.outputs.version }}" \
68
+ # --build-arg="UBUNTU_VERSION=${{ steps.get_nodejs_version.outputs.ubuntu_version }}" \
69
+ # --build-arg="RUN_TEST=true" \
70
+ # --output type=local,dest=./prebuilds,platform-split=false \
71
+ # -f ./.github/docker/Dockerfile.glibc \
72
+ # .
0 commit comments