|
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 | | - |
4 | 1 | name: Node.js CI |
5 | 2 |
|
6 | 3 | on: |
|
11 | 8 |
|
12 | 9 | jobs: |
13 | 10 | build: |
14 | | - |
15 | 11 | runs-on: ubuntu-latest |
16 | 12 |
|
17 | 13 | strategy: |
18 | 14 | matrix: |
19 | 15 | node-version: [18.x, 20.x, 22.x] |
20 | | - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ |
21 | 16 |
|
22 | 17 | 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