Skip to content

Commit e9af725

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

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/ci.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
matrix:
20+
os: [ubuntu-latest, macos-latest, windows-latest]
21+
node: [12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
22+
# Avoid Error: Unable to find Node versions for platform darwin and architecture arm64:
23+
exclude:
24+
- os: macos-latest
25+
node: 12
26+
- os: macos-latest
27+
node: 13
28+
- os: macos-latest
29+
node: 14
30+
- os: macos-latest
31+
node: 15
32+
33+
steps:
34+
- name: Checkout repository
35+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
36+
37+
- name: Setup Node.js
38+
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2
39+
with:
40+
node-version: ${{ matrix.node }}
41+
42+
- name: Install dependencies
43+
run: npm install
44+
45+
- name: Install YO
46+
run: npm install -g yo
47+
48+
- name: Run tests
49+
run: npm test

0 commit comments

Comments
 (0)