-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (40 loc) · 1.02 KB
/
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
name: Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: sukyantestdb
POSTGRES_USER: sukyan
POSTGRES_PASSWORD: sukyantest1234
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
POSTGRES_DSN: postgres://sukyan:sukyantest1234@localhost:5432/sukyantestdb
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test -v ./...
- name: TruffleHog
uses: trufflesecurity/trufflehog@main
with:
extra_args: --only-verified