Skip to content

Commit 5533a8e

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

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/ci.yml

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

0 commit comments

Comments
 (0)