-
-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (30 loc) · 1.46 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
name: test
on: [ "push", "pull_request" ]
jobs:
test-lod-ubuntu-latest:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Go 1.19.3
uses: actions/setup-go@v4
with:
go-version: 1.19.3
- name: Install GEOS
run: sudo apt update && sudo apt -y install libgeos++-dev libgeos-3.8.0 libgeos-c1v5 libgeos-dev libgeos-doc
# - name: Lint code
# run: |
# gofiles=$(find ./ -name '*.go' -not -path "vendor/*") && [ -z "$gofiles" ] || unformatted=$(goimports -l $gofiles) && [ -z "$unformatted" ] || (echo >&2 "Go files must be formatted with gofmt. Following files has problem: $unformatted" && true);
# diff <(echo -n) <(gofmt -s -d .)
# export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14
# go get -u golang.org/x/lint/golint
# golint ./...
- name: Lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.50.1
args: --print-issued-lines --exclude-use-default=false --out-${NO_FUTURE}format colored-line-number
- name: Test
run: go test -v ./... -race -coverprofile=coverage.txt -covermode=atomic
# - name: Upload coverage profile to Codecov
# run: bash <(curl -s https://codecov.io/bash)