File tree Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Expand file tree Collapse file tree 1 file changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI/CD Pipeline
2
+
3
+ on :
4
+ push :
5
+ branches : [ main, master ]
6
+ pull_request :
7
+ branches : [ main, master ]
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+
13
+ strategy :
14
+ matrix :
15
+ node-version : [14.x, 16.x, 18.x]
16
+
17
+ steps :
18
+ - uses : actions/checkout@v3
19
+
20
+ - name : Use Node.js ${{ matrix.node-version }}
21
+ uses : actions/setup-node@v3
22
+ with :
23
+ node-version : ${{ matrix.node-version }}
24
+ cache : ' npm'
25
+
26
+ - name : Install dependencies
27
+ run : npm install
28
+
29
+ - name : Verify that addon builds
30
+ run : node -e "require('./addon')" # Simple test to ensure the addon loads without errors
31
+
32
+ # Add more steps here as your project grows
33
+ # - name: Run tests
34
+ # run: npm test
35
+
36
+ # Deployment job - add when you're ready to deploy
37
+ # deploy:
38
+ # needs: build
39
+ # runs-on: ubuntu-latest
40
+ # if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
41
+ # steps:
42
+ # - name: Checkout code
43
+ # uses: actions/checkout@v3
44
+ #
45
+ # - name: Setup Node.js
46
+ # uses: actions/setup-node@v3
47
+ # with:
48
+ # node-version: '16.x'
49
+ #
50
+ # - name: Deploy to hosting service
51
+ # # Add deployment steps here
You can’t perform that action at this time.
0 commit comments