Skip to content

Commit 8dec753

Browse files
committed
fix(ci)!: drop node <18 and update ci
1 parent e631ae4 commit 8dec753

File tree

1 file changed

+18
-147
lines changed

1 file changed

+18
-147
lines changed

.github/workflows/ci.yml

+18-147
Original file line numberDiff line numberDiff line change
@@ -1,160 +1,51 @@
11
name: ci
22

33
on:
4-
- pull_request
5-
- push
4+
push:
5+
branches:
6+
- master
7+
- '1.x'
8+
paths-ignore:
9+
- '*.md'
10+
pull_request:
11+
paths-ignore:
12+
- '*.md'
613

714
jobs:
815
test:
916
runs-on: ubuntu-20.04
1017
strategy:
1118
matrix:
1219
name:
13-
- Node.js 0.6
14-
- Node.js 0.8
15-
- Node.js 0.10
16-
- Node.js 0.12
17-
- io.js 1.x
18-
- io.js 2.x
19-
- io.js 3.x
20-
- Node.js 4.x
21-
- Node.js 5.x
22-
- Node.js 6.x
23-
- Node.js 7.x
24-
- Node.js 8.x
25-
- Node.js 9.x
26-
- Node.js 10.x
27-
- Node.js 11.x
28-
- Node.js 12.x
29-
- Node.js 13.x
30-
- Node.js 14.x
31-
- Node.js 15.x
32-
- Node.js 16.x
33-
- Node.js 17.x
3420
- Node.js 18.x
3521
- Node.js 19.x
3622
- Node.js 20.x
3723
- Node.js 21.x
24+
- Node.js 22.x
3825

3926
include:
40-
- name: Node.js 0.6
41-
node-version: "0.6"
42-
43-
npm-rm: nyc
44-
45-
- name: Node.js 0.8
46-
node-version: "0.8"
47-
48-
npm-rm: nyc
49-
50-
- name: Node.js 0.10
51-
node-version: "0.10"
52-
53-
54-
- name: Node.js 0.12
55-
node-version: "0.12"
56-
57-
58-
- name: io.js 1.x
59-
node-version: "1.8"
60-
61-
62-
- name: io.js 2.x
63-
node-version: "2.5"
64-
65-
66-
- name: io.js 3.x
67-
node-version: "3.3"
68-
69-
70-
- name: Node.js 4.x
71-
node-version: "4.9"
72-
73-
74-
- name: Node.js 5.x
75-
node-version: "5.12"
76-
77-
78-
- name: Node.js 6.x
79-
node-version: "6.17"
80-
81-
82-
- name: Node.js 7.x
83-
node-version: "7.10"
84-
85-
86-
- name: Node.js 8.x
87-
node-version: "8.17"
88-
89-
90-
- name: Node.js 9.x
91-
node-version: "9.11"
92-
93-
94-
- name: Node.js 10.x
95-
node-version: "10.24"
96-
97-
98-
- name: Node.js 11.x
99-
node-version: "11.15"
100-
101-
102-
- name: Node.js 12.x
103-
node-version: "12.22"
104-
105-
- name: Node.js 13.x
106-
node-version: "13.14"
107-
108-
- name: Node.js 14.x
109-
node-version: "14.18"
110-
111-
- name: Node.js 15.x
112-
node-version: "15.14"
113-
114-
- name: Node.js 16.x
115-
node-version: "16.13"
116-
117-
- name: Node.js 17.x
118-
node-version: "17.3"
119-
12027
- name: Node.js 18.x
121-
node-version: "18.18"
28+
node-version: "18"
12229

12330
- name: Node.js 19.x
124-
node-version: "19.9"
31+
node-version: "19"
12532

12633
- name: Node.js 20.x
127-
node-version: "20.9"
34+
node-version: "20"
12835

12936
- name: Node.js 21.x
130-
node-version: "21.1"
37+
node-version: "21"
38+
39+
- name: Node.js 22.x
40+
node-version: "22"
13141

13242
steps:
133-
- uses: actions/checkout@v3
43+
- uses: actions/checkout@v4
13444

13545
- name: Install Node.js ${{ matrix.node-version }}
13646
shell: bash -eo pipefail -l {0}
13747
run: |
138-
if [[ "${{ matrix.node-version }}" == 0.6* ]]; then
139-
sudo sh -c 'echo "deb http://us.archive.ubuntu.com/ubuntu/ bionic universe" >> /etc/apt/sources.list'
140-
sudo sh -c 'echo "deb http://security.ubuntu.com/ubuntu bionic-security main" >> /etc/apt/sources.list'
141-
sudo apt-get update
142-
sudo apt-get install g++-4.8 gcc-4.8 libssl1.0-dev python2 python-is-python2
143-
export CC=/usr/bin/gcc-4.8
144-
export CXX=/usr/bin/g++-4.8
145-
fi
14648
nvm install --default ${{ matrix.node-version }}
147-
if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
148-
nvm install --alias=npm 0.10
149-
nvm use ${{ matrix.node-version }}
150-
if [[ "$(npm -v)" == 1.1.* ]]; then
151-
nvm exec npm npm install -g [email protected]
152-
ln -fs "$(which npm)" "$(dirname "$(nvm which npm)")/npm"
153-
else
154-
sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")"
155-
fi
156-
npm config set strict-ssl false
157-
fi
15849
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
15950
16051
- name: Configure npm
@@ -165,26 +56,6 @@ jobs:
16556
npm config set shrinkwrap false
16657
fi
16758
168-
- name: Remove npm module(s) ${{ matrix.npm-rm }}
169-
run: npm rm --silent --save-dev ${{ matrix.npm-rm }}
170-
if: matrix.npm-rm != ''
171-
172-
- name: Install npm module(s) ${{ matrix.npm-i }}
173-
run: npm install --save-dev ${{ matrix.npm-i }}
174-
if: matrix.npm-i != ''
175-
176-
- name: Setup Node.js version-specific dependencies
177-
shell: bash
178-
run: |
179-
# eslint for linting
180-
# - remove on Node.js < 10
181-
if [[ "$(cut -d. -f1 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
182-
node -pe 'Object.keys(require("./package").devDependencies).join("\n")' | \
183-
grep -E '^eslint(-|$)' | \
184-
sort -r | \
185-
xargs -n1 npm rm --silent --save-dev
186-
fi
187-
18859
- name: Install Node.js dependencies
18960
run: npm install
19061

0 commit comments

Comments
 (0)