mirror of
https://github.com/interviewstreet/go-jira.git
synced 2025-08-06 22:13:02 +02:00
44 lines
905 B
YAML
44 lines
905 B
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
name: Test and lint
|
|
strategy:
|
|
matrix:
|
|
go-version: [1.x, 1.15.x, 1.14.x]
|
|
platform: [ubuntu-latest, windows-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-go@v2
|
|
with:
|
|
go-version: 1.14
|
|
|
|
# Caching go modules to speed up the run
|
|
- uses: actions/cache@v2
|
|
with:
|
|
path: ~/go/pkg/mod
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-
|
|
|
|
- name: Run go fmt
|
|
if: runner.os != 'Windows'
|
|
run: diff -u <(echo -n) <(gofmt -d -s .)
|
|
|
|
- name: Run go vet
|
|
run: make vet
|
|
|
|
- name: Run staticcheck
|
|
run: make staticcheck
|
|
|
|
- name: Run Unit tests.
|
|
run: make test
|