Skip to content

Add db indexes to Gorm config #37

Add db indexes to Gorm config

Add db indexes to Gorm config #37

Workflow file for this run

name: Build
on:
workflow_dispatch:
push:
branches: [master]
pull_request:
branches: [master]
workflow_call:
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.18"
- name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
- name: Verify dependencies
run: go mod verify
- name: lint
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.52
args: --skip-files .*_test.go --enable wsl --enable misspell --out-format=colored-line-number --timeout 180s
- name: Build
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -v cmd/clouddriver/clouddriver.go
- name: Test
run: go test -v ./...
env:
GOOGLE_APPLICATION_CREDENTIALS: test/credentials/test-keyfile.json
- uses: actions/upload-artifact@v3
with:
name: build
path: clouddriver