-
Notifications
You must be signed in to change notification settings - Fork 7
64 lines (56 loc) · 1.42 KB
/
build.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Build
on: push
jobs:
run_tests:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: website_admin_test
steps:
- name: Checkout
uses: actions/[email protected]
- uses: actions/setup-go@v2
with:
go-version: '^1.17.5'
- name: Run API test
run: |
go test jobs
go test contact
go test sitemap
env:
DB_HOST: localhost
DB_NAME: website_admin_test
SENDER: ${{ secrets.SENDER }}
RECEIVER: "[email protected]"
ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
SECRET_ACCESS_KEY: ${{ secrets.SECRET_ACCESS_KEY }}
REGION: ${{ secrets.AWS_REGION }}
build:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/[email protected]
- uses: actions/setup-go@v2
with:
go-version: '^1.17.5'
- uses: actions/setup-node@v1
with:
node-version: '16'
- name: Build frontend
run: |
cd vue-frontend
npm ci
npx prettier -c .
npx eslint .
npm run build
- name: Build backend
run: |
GOOS=linux GOARCH=amd64 go build -o main main.go