forked from nodejs/llnode
-
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 2.64 KB
/
push.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
name: on push or pull_request
on:
push:
branches:
- main
pull_request:
schedule:
- cron: '0 0 * * *'
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node:
- version: 10.x
- version: 12.x
- version: 14.x
- version: 15.x
mirror: https://nodejs.org/download/nightly
- version: 15.x
mirror: https://nodejs.org/download/v8-canary
# os: [ubuntu-latest, macos-latest]
# Temporarily disable MacOS until
# https://github.com/nodejs/node/issues/32981 is fixed
# TODO(mmarchini): test on 20.04 (need different lldb version)
os: [ubuntu-18.04, ubuntu-20.04]
llvm: [ 8, 9 ]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node.version }} ${{ matrix.node.mirror }}
uses: No9/setup-node@mirror
with:
node-version: ${{ matrix.node.version }}
# TODO(mmarchini): re-enable once mirror is supported on setup-node
node-mirror: ${{ matrix.node.mirror }}
- name: install dependencies Linux
if: startsWith(matrix.os, 'ubuntu-')
run: |
sudo apt-get -qq update
sudo apt-get install lldb-${{ matrix.llvm }} liblldb-${{ matrix.llvm }}-dev lcov gdb -y
sudo ln -s $(which lldb-${{ matrix.llvm }}) /usr/bin/lldb
- name: npm install
run: |
npm install --llnode_build_addon=true --llnode_coverage=true
- name: run tests
run: TEST_LLDB_BINARY=`which lldb-${{ matrix.llvm }}` npm run nyc-test-all
if: matrix.node.version != '15.x'
- name: run tests (nightly)
run: TEST_LLDB_BINARY=`which lldb-${{ matrix.llvm }}` npm run nyc-test-all
if: matrix.node.version == '15.x'
continue-on-error: true
- name: prepare coverage
if: startsWith(matrix.os, 'ubuntu-') && matrix.node.version != '15.x'
run: |
npm run coverage
cat ./coverage-js.info > ./coverage.info
cat ./coverage-cc.info >> ./coverage.info
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
file: ./coverage.info
linter:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Use Node.js LTS
uses: actions/setup-node@v3
with:
node-version: 12.x
- name: npm install, build, and test
run: |
sudo apt-get -qq update
sudo apt-get install lldb-6.0 liblldb-6.0-dev lcov -y
sudo ln -s $(which lldb-6.0) /usr/bin/lldb
npm install
npm run linter