Skip to content

Commit 5583f1b

Browse files
author
Gonzalo Diaz
committed
[CONFIG] [Github Actions] Node Unit tests with artifacts
1 parent 03ab8f7 commit 5583f1b

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

.github/workflows/node.js.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
"ubuntu-latest",
2121
"macOS-latest"
2222
]
23-
node-version: [18.x, 20.x, 22.5.1]
23+
node-version: [18.x, 20.x, 22.x]
2424
# See supported Node.js release schedule
2525
# at https://nodejs.org/en/about/releases/
2626

@@ -36,8 +36,41 @@ jobs:
3636
- name: Install dependencies
3737
run: npm ci --verbose
3838

39+
- uses: actions/upload-artifact@master
40+
with:
41+
name: dependencies-dist-${{ matrix.os }}-${{ matrix.node-version }}
42+
path: node_modules
43+
44+
Lint:
45+
runs-on: ubuntu-latest
46+
strategy:
47+
matrix:
48+
os: [
49+
"windows-latest",
50+
"ubuntu-latest",
51+
"macOS-latest"
52+
]
53+
node-version: [18.x, 20.x, 22.x]
54+
needs: build
55+
steps:
56+
- name: Checkout repository
57+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
58+
59+
- name: Artifacts
60+
uses: actions/download-artifact@master
61+
with:
62+
name: dependencies-dist-${{ matrix.os }}-${{ matrix.node-version }}
63+
path: node_modules
64+
3965
- name: Lint
40-
run: npm run lint
66+
run: |
67+
pwd
68+
ls -alh .
69+
ls -alh node_modules
70+
ls -alh node_modules/.bin
71+
chmod +x node_modules/.bin/*
72+
ls -alh node_modules/.bin
73+
npm run lint
4174
4275
- name: Run the tests
4376
run: npm run jest:ci

0 commit comments

Comments
 (0)