Skip to content

Commit c2a3c82

Browse files
committed
feat: add GitHub CI workflow
1 parent df65616 commit c2a3c82

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/ci.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
build:
14+
runs-on: ${{ matrix.os }}
15+
16+
strategy:
17+
fail-fast: false
18+
# TODO: Include Node@22 and Node@23 when https://github.com/yeoman/yo/issues/842 is resolved
19+
# TODO: Include Node@19, Node@20, Node@21 when https://github.com/yeoman/doctor/issues/67 is resolved
20+
# TODO: Include windows-latest when https://github.com/yeoman/doctor/issues/69 is resolved
21+
matrix:
22+
os: [ubuntu-latest, macos-latest]
23+
node: [12, 13, 14, 15, 16, 17, 18]
24+
# Avoid Error: Unable to find Node versions for platform darwin and architecture arm64:
25+
exclude:
26+
- os: macos-latest
27+
node: 12
28+
- os: macos-latest
29+
node: 13
30+
- os: macos-latest
31+
node: 14
32+
- os: macos-latest
33+
node: 15
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
38+
39+
- name: Setup Node.js
40+
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
41+
with:
42+
node-version: ${{ matrix.node }}
43+
44+
- name: Install dependencies
45+
run: npm install
46+
47+
- name: Install YO
48+
run: npm install -g yo
49+
50+
- name: Run tests
51+
run: npm test

0 commit comments

Comments
 (0)