Skip to content

Commit 9139fb5

Browse files
committed
ci: add test to ci
1 parent 418ae21 commit 9139fb5

File tree

1 file changed

+33
-16
lines changed

1 file changed

+33
-16
lines changed

.github/workflows/actions.yml

Lines changed: 33 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,35 @@
1-
# name: qitpy actions
1+
name: Check ReactJS Build
22

3-
# on:
4-
# push:
5-
# branches: [develop]
3+
on:
4+
pull_request:
5+
branches:
6+
- master
67

7-
# jobs:
8-
# test_and_deploy:
9-
# runs-on: self-hosted
10-
# steps:
11-
# - name: Checkout
12-
# uses: actions/checkout@v2
13-
# - name: Down Containers
14-
# run: docker-compose -f docker-compose-deploy.yml down
15-
# - name: Build
16-
# run: docker-compose -f docker-compose-deploy.yml build
17-
# - name: run
18-
# run: docker-compose -f docker-compose-deploy.yml up -d
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 21.1.0 # Adjust the Node.js version to your project's requirements
20+
21+
- name: Install dependencies
22+
run: yarn
23+
24+
- name: Build
25+
run: yarn run build
26+
27+
- name: Verify build success
28+
run: |
29+
if [ -d "build" ]; then
30+
echo "Build successful"
31+
exit 0
32+
else
33+
echo "Build failed"
34+
exit 1
35+
fi

0 commit comments

Comments
 (0)