-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (53 loc) · 1.39 KB
/
ci.yml
File metadata and controls
57 lines (53 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: 'CI'
on:
push:
branches:
- '*'
- '*/*'
- '**'
pull_request:
branches:
- '*'
- '*/*'
- '**'
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, 24.x]
fail-fast: false
steps:
- uses: actions/checkout@v6
with:
persist-credentials: true
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v47
- name: List all changed files
run: |
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do
echo "$file was changed"
done
- name: Check changes
id: changed-ignored
uses: tj-actions/changed-files@v47
with:
files: |
**.md
.github/**
src/data/**/*.json
.env.example
- name: Setup node
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: npm
if: steps.changed-ignored.outputs.only_modified == 'false'
- run: npm ci
if: steps.changed-ignored.outputs.only_modified == 'false'
- run: npm run lint && npm run test
if: steps.changed-ignored.outputs.only_modified == 'false'
- run: echo "✅ Lint and tests completed successfully on Node.js ${{ matrix.node-version }}!"