-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (31 loc) · 909 Bytes
/
main.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 and lint
on:
push:
branches:
tags:
pull_request:
branches:
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: debug if needed
run: if [[ "$DEBUG" == "true" ]]; then env; fi
env:
DEBUG: ${{secrets.DEBUG}}
- name: install go
uses: actions/setup-go@v1
with:
go-version: 1.15
- name: install golangci-lint
run: |
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $GITHUB_WORKSPACE v1.35.2
- name: test and lint
run: |
go test -race -timeout=60s ./...
$GITHUB_WORKSPACE/golangci-lint --config ${GITHUB_WORKSPACE}/.golangci.yml run --out-format=github-actions ./...
working-directory: ./
env:
GOFLAGS: "-mod=mod"
TZ: "Europe/Minsk"