Skip to content

Commit e98bb85

Browse files
authored
Update node.js.yml
1 parent a2c1bb2 commit e98bb85

1 file changed

Lines changed: 29 additions & 21 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3-
41
name: Node.js CI
52

63
on:
@@ -11,28 +8,39 @@ on:
118

129
jobs:
1310
build:
14-
1511
runs-on: ubuntu-latest
1612

1713
strategy:
1814
matrix:
1915
node-version: [18.x, 20.x, 22.x]
20-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2116

2217
steps:
23-
- uses: actions/checkout@v4
24-
- name: Use Node.js ${{ matrix.node-version }}
25-
uses: actions/setup-node@v4
26-
with:
27-
node-version: ${{ matrix.node-version }}
28-
cache: 'npm'
29-
- run: cd back
30-
- run: npm install
31-
- run: npm ci --if-present
32-
- run: npm run build --if-present
33-
- run: npm test
34-
- run: cd ..
35-
- run: cd front
36-
- run: npm install
37-
- run: npm run build --if-present
38-
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
cache: 'npm'
25+
26+
- name: Install dependencies (back)
27+
working-directory: ./back
28+
run: npm ci
29+
30+
- name: Build (back)
31+
working-directory: ./back
32+
run: npm run build --if-present
33+
34+
- name: Test (back)
35+
working-directory: ./back
36+
run: npm test
37+
38+
- name: Install dependencies (front)
39+
working-directory: ./front
40+
run: npm ci
41+
continue-on-error: true # Si le dossier front n'existe pas, ça n'arrête pas tout
42+
43+
- name: Build (front)
44+
working-directory: ./front
45+
run: npm run build --if-present
46+
continue-on-error: true

0 commit comments

Comments
 (0)