Repository navigation
68 lines (60 loc) · 2.02 KB
/
Copy pathtests.yml
File metadata and controls
68 lines (60 loc) · 2.02 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
58
59
60
61
62
63
64
65
66
67
68
name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
Build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, lts/*, 'node']
steps:
- name: Check out the code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
# The unit tests load test schemas from the hed-tests submodule as well.
submodules: true
- name: No CRLF line endings in tracked files
run: |
if git ls-files --eol | grep -E '^i/(crlf|mixed)' | grep -v 'attr/-text'; then
echo "CRLF found in the files above; .gitattributes requires LF."
exit 1
fi
- name: Set up with Node.js ${{ matrix.node-version }}
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Print Node.js version and CI environment
run: |
echo "Node.js version: $(node -v)"
echo "Environment: CI=${{ env.CI }}"
- name: Download dependencies
run: npm ci
- name: Test with Node.js ${{ matrix.node-version }}
run: npm test
JSON-spec-tests:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x, lts/*, 'node']
steps:
- name: Check out the code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: true
- name: Set up with Node.js ${{ matrix.node-version }}
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.node-version }}
- name: Print Node.js version and CI environment
run: |
echo "Node.js version: $(node -v)"
echo "Environment: CI=${{ env.CI }}"
- name: Download dependencies
run: npm ci
- name: Run JSON spec tests with Node.js ${{ matrix.node-version }}
run: npm run testSpecs