Skip to content

Commit 17d1e40

Browse files
committed
add macos test
1 parent d700770 commit 17d1e40

File tree

1 file changed

+182
-0
lines changed

1 file changed

+182
-0
lines changed

.github/workflows/macos.yml

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
name: iojs-ci
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths-ignore:
8+
- '*.md'
9+
pull_request:
10+
paths-ignore:
11+
- '*.md'
12+
13+
concurrency:
14+
group: "${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
test:
19+
runs-on: macos-latest
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
name:
24+
- Node.js 0.8
25+
- Node.js 0.10
26+
- Node.js 0.12
27+
- Node.js 4.x
28+
- Node.js 5.x
29+
- Node.js 6.x
30+
- Node.js 7.x
31+
- Node.js 8.x
32+
- Node.js 9.x
33+
- Node.js 10.x
34+
- Node.js 11.x
35+
- Node.js 12.x
36+
- Node.js 13.x
37+
- Node.js 14.x
38+
- Node.js 15.x
39+
- Node.js 16.x
40+
- Node.js 17.x
41+
- Node.js 18.x
42+
- Node.js 19.x
43+
- Node.js 20.x
44+
- Node.js 21.x
45+
- Node.js 22.x
46+
- Node.js 23.x
47+
include:
48+
- name: Node.js 0.8
49+
node-version: "0.8"
50+
51+
npm-rm: nyc
52+
53+
- name: Node.js 0.10
54+
node-version: "0.10"
55+
56+
npm-version: "[email protected]"
57+
58+
- name: Node.js 0.12
59+
node-version: "0.12"
60+
61+
npm-version: "[email protected]"
62+
63+
- name: Node.js 4.x
64+
node-version: "4.9"
65+
66+
67+
- name: Node.js 5.x
68+
node-version: "5.12"
69+
70+
npm-version: [email protected]
71+
72+
- name: Node.js 6.x
73+
node-version: "6.17"
74+
75+
76+
- name: Node.js 7.x
77+
node-version: "7.10"
78+
79+
80+
- name: Node.js 8.x
81+
node-version: "8.17"
82+
83+
84+
- name: Node.js 9.x
85+
node-version: "9.11"
86+
87+
88+
- name: Node.js 10.x
89+
node-version: "10.24"
90+
91+
92+
- name: Node.js 11.x
93+
node-version: "11.15"
94+
95+
96+
- name: Node.js 12.x
97+
node-version: "12.22"
98+
99+
100+
- name: Node.js 13.x
101+
node-version: "13.14"
102+
103+
104+
- name: Node.js 14.x
105+
node-version: "14.21"
106+
107+
108+
- name: Node.js 15.x
109+
node-version: "15"
110+
111+
112+
- name: Node.js 16.x
113+
node-version: "16"
114+
115+
116+
- name: Node.js 17.x
117+
node-version: "17"
118+
119+
120+
- name: Node.js 18.x
121+
node-version: "18"
122+
123+
- name: Node.js 19.x
124+
node-version: "19"
125+
126+
- name: Node.js 20.x
127+
node-version: "20"
128+
129+
- name: Node.js 21.x
130+
node-version: "21"
131+
132+
- name: Node.js 22.x
133+
node-version: "22"
134+
135+
- name: Node.js 23.x
136+
node-version: "23"
137+
138+
steps:
139+
- uses: actions/checkout@v4
140+
- name: Install Node.js ${{ matrix.node-version }}
141+
shell: bash -eo pipefail -l {0}
142+
run: |
143+
nvm install --default ${{ matrix.node-version }}
144+
if [[ "${{ matrix.node-version }}" == 0.* && "$(cut -d. -f2 <<< "${{ matrix.node-version }}")" -lt 10 ]]; then
145+
nvm install --alias=npm 0.10
146+
nvm use ${{ matrix.node-version }}
147+
if [[ "$(npm -v)" == 1.1.* ]]; then
148+
nvm exec npm npm install -g [email protected]
149+
ln -fs "$(which npm)" "$(dirname "$(nvm which npm)")/npm"
150+
else
151+
sed -i '1s;^.*$;'"$(printf '#!%q' "$(nvm which npm)")"';' "$(readlink -f "$(which npm)")"
152+
fi
153+
npm config set strict-ssl false
154+
fi
155+
dirname "$(nvm which ${{ matrix.node-version }})" >> "$GITHUB_PATH"
156+
157+
- name: Configure npm
158+
run: |
159+
if [[ "$(npm config get package-lock)" == "true" ]]; then
160+
npm config set package-lock false
161+
else
162+
npm config set shrinkwrap false
163+
fi
164+
165+
- name: Remove non-test dependencies
166+
run: npm rm --silent --save-dev connect-redis
167+
168+
- name: Install Node.js dependencies
169+
run: npm install
170+
171+
- name: List environment
172+
id: list_env
173+
shell: bash
174+
run: |
175+
echo "node@$(node -v)"
176+
echo "npm@$(npm -v)"
177+
npm -s ls ||:
178+
(npm -s ls --depth=0 ||:) | awk -F'[ @]' 'NR>1 && $2 { print $2 "=" $3 }' >> "$GITHUB_OUTPUT"
179+
180+
- name: Run tests
181+
shell: bash
182+
run: npm run test

0 commit comments

Comments
 (0)