1+ name : ci - old codemods
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ - develop
8+ paths-ignore :
9+ - ' *.md'
10+ pull_request :
11+ paths-ignore :
12+ - ' *.md'
13+
14+ # Cancel in progress workflows
15+ # in the scenario where we already had a run going for that PR/branch/tag but then triggered a new run
16+ concurrency :
17+ group : " ${{ github.workflow }} ✨ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
18+ cancel-in-progress : true
19+
20+ permissions :
21+ contents : read
22+
23+ jobs :
24+ lint :
25+ name : Lint
26+ runs-on : ubuntu-latest
27+ steps :
28+ - uses : actions/checkout@v4
29+ - name : Setup Node.js {{ matrix.node-version }}
30+ uses : actions/setup-node@v4
31+ with :
32+ node-version : ' lts/*'
33+
34+ - name : Install dependencies
35+ run : npm install --ignore-scripts --only=dev
36+
37+ - name : Run lint
38+ run : npm run lint
39+
40+ test :
41+ strategy :
42+ fail-fast : false
43+ matrix :
44+ os : [ubuntu-latest, windows-latest, macos-latest]
45+ node-version : [18, 19, 20, 21, 22, 23]
46+ # Node.js release schedule: https://nodejs.org/en/about/releases/
47+
48+ name : Node.js ${{ matrix.node-version }} - ${{matrix.os}}
49+
50+ runs-on : ${{ matrix.os }}
51+ steps :
52+ - uses : actions/checkout@v4
53+ with :
54+ persist-credentials : false
55+
56+ - name : Setup Node.js ${{ matrix.node-version }}
57+ uses : actions/setup-node@v4
58+ with :
59+ node-version : ${{ matrix.node-version }}
60+
61+ - name : Configure npm loglevel
62+ run : |
63+ npm config set loglevel error
64+ shell : bash
65+
66+ - name : Install dependencies
67+ run : npm install
68+
69+ - name : Output Node and NPM versions
70+ run : |
71+ echo "Node.js version: $(node -v)"
72+ echo "NPM version: $(npm -v)"
73+
74+ - name : Run tests
75+ shell : bash
76+ run : |
77+ npm run test:ci
0 commit comments