-
Notifications
You must be signed in to change notification settings - Fork 11
43 lines (36 loc) · 878 Bytes
/
build_and_test.yml
File metadata and controls
43 lines (36 loc) · 878 Bytes
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
name: Build and test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
BuildAndTestLibrary:
runs-on: ubuntu-20.04
services:
mysql:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: "root"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21.0
- name: Formatting check
run: ./gofmt_check.sh
- name: Lint
uses: golangci/golangci-lint-action@v2
with:
version: latest
args: --timeout 5m0s
- name: Build
run: go build ./...
- name: Test
run: |
mysql -u root -p'root' -h 127.0.0.1 -P 3306 < internal/database/docker/db_init/flare_ftso_indexer.sql
go test -v ./test