Skip to content

Commit 909b314

Browse files
add github actions
1 parent b3f8502 commit 909b314

File tree

3 files changed

+59
-0
lines changed

3 files changed

+59
-0
lines changed

.github/workflows/build-and-test.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: NodeJS with Webpack
2+
3+
on:
4+
push:
5+
branches: ['main', 'release/*']
6+
pull_request:
7+
branches: ['**']
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
strategy:
14+
matrix:
15+
node-version: [18.x]
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Use Node.js ${{ matrix.node-version }}
21+
uses: actions/setup-node@v3
22+
with:
23+
node-version: ${{ matrix.node-version }}
24+
25+
- name: Install dependencies
26+
run: npm install
27+
28+
- name: Run the tests
29+
run: npm test
30+
31+
- name: Build
32+
run: npm run build
33+
env:
34+
CI: false
35+
36+
docker:
37+
38+
runs-on: ubuntu-latest
39+
needs: build
40+
41+
steps:
42+
- name: Checkout
43+
uses: actions/checkout@v4
44+
- name: Set up QEMU
45+
uses: docker/setup-qemu-action@v3
46+
- name: Set up Docker Buildx
47+
uses: docker/setup-buildx-action@v3
48+
- name: Login to Docker Hub
49+
uses: docker/login-action@v3
50+
with:
51+
username: ${{ secrets.DOCKERHUB_USERNAME }}
52+
password: ${{ secrets.DOCKERHUB_TOKEN }}
53+
- name: Build and push
54+
uses: docker/build-push-action@v6
55+
with:
56+
context: .
57+
push: true
58+
tags: xcodeassociated/react-typescript-vite-template:latest

bun.lockb

9.38 KB
Binary file not shown.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"@testing-library/jest-dom": "^6.4.6",
2929
"@testing-library/react": "^16.0.0",
3030
"@testing-library/user-event": "^14.5.2",
31+
"@types/jest": "^29.5.12",
3132
"@types/node": "^20.14.9",
3233
"@types/react": "^18.3.3",
3334
"@types/react-dom": "^18.3.0",

0 commit comments

Comments
 (0)