-
Notifications
You must be signed in to change notification settings - Fork 6
66 lines (58 loc) · 1.47 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
65
66
name: Build
on: push
jobs:
run_tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
ports:
- 5432:5432
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: 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
go test blogs
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: "18"
- name: Build frontend
run: |
cd nuxt-frontend
yarn install
npx prettier -c .
npx eslint .
yarn build
- name: Build backend
run: |
GOOS=linux GOARCH=amd64 go build -o main main.go