-
-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (32 loc) · 1.07 KB
/
pr.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
name: Pull Request
on: [pull_request]
jobs:
build:
name: Unit tests
runs-on: ubuntu-latest
env:
GOPRIVATE: "github.com/cksidharthan/*"
GOCARDLESS_SECRET_ID: ${{ secrets.GOCARDLESS_SECRET_ID }}
GOCARDLESS_SECRET_KEY: ${{ secrets.GOCARDLESS_SECRET_KEY }}
GOCARDLESS_TEST_ACCOUNT_ID: ${{ secrets.GOCARDLESS_TEST_ACCOUNT_ID }}
steps:
# Checkout
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
# Go
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: "^1.18"
- run: go install honnef.co/go/tools/cmd/staticcheck@latest
- run: go mod vendor
- run: go test -race ./... -coverpkg=./... -coverprofile=coverage.out
- run: go test -race ./... -json > test.out\
- run: go vet ./... 2> govet.out || true # Ignore status code
- run: staticcheck ./... > golint.out || true # Ignore status code
# Check project version
- name: Project version
id: vars
run: echo ::set-output name=version::$(cat .version)