-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (40 loc) · 1.17 KB
/
ci.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
39
40
on:
pull_request:
push:
branches:
- main
name: Test
jobs:
test:
strategy:
max-parallel: 1
matrix:
go-version: [ '1.18', '1.19', '1.20']
os: [ 'ubuntu-latest' ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
check-latest: true
cache: true
- run: go mod verify
- run: go build -v ./...
- run: go vet ./...
- name: Install staticcheck for go 1.18
if: matrix.go-version == '1.18'
run: go install honnef.co/go/tools/cmd/staticcheck@v0.3.3
- name: Install staticcheck
if: matrix.go-version != '1.18'
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run staticcheck
run: staticcheck ./...
- run: make test
env:
API_BASE: ${{ secrets.API_BASE }}
TEST_USERNAME: ${{ secrets.TEST_USERNAME }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
SMARTPAY_SECRET_KEY: ${{ secrets.SMARTPAY_SECRET_KEY }}
SMARTPAY_PUBLIC_KEY: ${{ secrets.SMARTPAY_PUBLIC_KEY }}
SMARTPAY_API_PREFIX: ${{ secrets.SMARTPAY_API_PREFIX }}