You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 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
-
name: Node.js CI
1
+
name: Workflow App CI/CD
5
2
6
3
on:
7
4
push:
8
-
branches: [ "github" ]
5
+
branches: [ "main", "development" ]
9
6
pull_request:
10
-
branches: [ "github" ]
7
+
branches: [ "main", "development" ]
11
8
12
9
jobs:
13
-
build:
14
-
10
+
build-and-test:
15
11
runs-on: ubuntu-latest
16
-
17
12
strategy:
18
13
matrix:
19
14
node-version: [18.x, 20.x, 22.x]
20
-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
21
15
22
16
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: npm ci
30
-
- run: npm run build --if-present
31
-
- run: npm test
17
+
- name: Checkout Repository
18
+
uses: actions/checkout@v4
19
+
20
+
- name: Set up 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
27
+
run: npm ci
28
+
29
+
- name: Build the App
30
+
run: npm run build --if-present
31
+
32
+
- name: Run Tests
33
+
run: npm test
34
+
35
+
- name: Upload Build Artifacts
36
+
uses: actions/upload-artifact@v4
37
+
with:
38
+
name: build-artifacts
39
+
path: dist/
40
+
41
+
run-shell-scripts:
42
+
needs: build-and-test
43
+
runs-on: ubuntu-latest
44
+
45
+
steps:
46
+
- name: Checkout Repository
47
+
uses: actions/checkout@v4
48
+
49
+
- name: Grant Execute Permissions to Shell Scripts
0 commit comments