forked from nats-nui/nui
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (45 loc) · 1.22 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: build
on:
push:
branches:
- main
workflow_call:
jobs:
build_test_fe:
name: Build and test FE
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Dependencies
run: npm install
working-directory: ./frontend
- name: Build Project
run: npm run build
working-directory: ./frontend
- name: Archive Production Artifact
uses: actions/upload-artifact@v2
with:
name: frontend-build
path: frontend/dist
build_test_be:
name : Build and test BE
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: setup dist-app directory # required for go build to embed it in the binary
run: mkdir frontend/dist-app && touch frontend/dist-app/sample.txt
- name: Install
run: go get
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./...