Skip to content

Commit cb85564

Browse files
committed
integration work
1 parent 663513d commit cb85564

File tree

1 file changed

+17
-52
lines changed

1 file changed

+17
-52
lines changed

.github/workflows/integration.yml

Lines changed: 17 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -3,62 +3,27 @@ name: Integration
33

44
on:
55
push:
6-
branches:
7-
- main # or your default branch
6+
branches: [ "main" ]
87
pull_request:
9-
branches:
10-
- main
8+
branches: [ "main" ]
119

1210
jobs:
1311
build:
14-
runs-on: ubuntu-latest
15-
16-
steps:
17-
# Step 1: Checkout code
18-
- name: Checkout code
19-
uses: actions/checkout@v2
20-
21-
# Step 2: Set up the environment
22-
- name: Set up Node.js
23-
uses: actions/setup-node@v2
24-
with:
25-
node-version: '20' # specify your Node.js version
26-
27-
# Step 3: Install dependencies
28-
- name: Install dependencies
29-
run: npm i
30-
# step 4 Build
31-
- name:
32-
run: npm run build
3312

13+
runs-on: ubuntu-latest
3414

35-
# deploy:
36-
# runs-on: ubuntu-latest
37-
# needs: build # ensures the deploy job runs after the build job
38-
# steps:
39-
# # Step 1: Checkout code
40-
# - name: Checkout code
41-
# uses: actions/checkout@v2
42-
43-
# # Step 2: Set up Node.js (again for deployment environment)
44-
# - name: Set up Node.js
45-
# uses: actions/setup-node@v2
46-
# with:
47-
# node-version: '14'
48-
49-
# # Step 3: Install dependencies (again in the deployment environment)
50-
# - name: Install dependencies
51-
# run: npm install
15+
strategy:
16+
matrix:
17+
node-version: [18.x, 20.x, 22.x]
18+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
5219

53-
# # Step 4: Deploy to the server via SSH
54-
# - name: Deploy to Server
55-
# run: |
56-
# ssh -o StrictHostKeyChecking=no ${{ secrets.SSH_USER }}@${{ secrets.SERVER_IP }} << 'EOF'
57-
# cd /path/to/your/project
58-
# git pull origin main
59-
# npm install
60-
# npm run build # if you have a build step, otherwise skip
61-
# pm2 restart all # or your preferred process manager
62-
# EOF
63-
# env:
64-
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
cache: 'npm'
27+
- run: npm ci
28+
- run: npm run build
29+
- run: npm test

0 commit comments

Comments
 (0)