-
Notifications
You must be signed in to change notification settings - Fork 2
50 lines (40 loc) · 1.19 KB
/
ci.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
47
48
49
50
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.20"]
node-version: ["18.18.0"]
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- node-version: "18.18.0"
next-env: "production"
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Set up Node.js for Next.js frontend
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Build Go backend
run: |
cd book-store-management-backend
go build -v ./...
- name: Test Go backend
run: |
cd book-store-management-backend
go test -v ./...
- name: Install dependencies for Next.js frontend
run: |
cd book-store-management
npm install
- name: Build Next.js frontend
run: |
cd book-store-management
NEXT_PUBLIC_ENVIRONMENT=${{ matrix.next-env }} npm run build