Skip to content

Commit d536c40

Browse files
authored
update ci.yml for github actions [#10] (#10)
1 parent 38b7b75 commit d536c40

File tree

2 files changed

+38
-32
lines changed

2 files changed

+38
-32
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: ci
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
strategy:
7+
matrix:
8+
go-version: [1.12.x, 1.13.x, 1.14.x]
9+
platform: [ubuntu-latest]
10+
runs-on: ${{ matrix.platform }}
11+
12+
steps:
13+
- uses: actions/setup-go@v1
14+
with:
15+
go-version: ${{ matrix.go-version }}
16+
- uses: actions/checkout@v2
17+
18+
- name: Cache go modules
19+
uses: actions/cache@v1
20+
with:
21+
path: ~/go/pkg/mod
22+
key: ${{ runner.os }}-go-${{ hashFiles('go.sum') }}
23+
restore-keys: ${{ runner.os }}-go-
24+
25+
- name: Run go vet
26+
run: go vet ./...
27+
28+
- name: Check gofmt diff
29+
run: |
30+
gofmt -d -s $(find . -name '*.go' |grep -v vendor)
31+
git diff --exit-code; code=$?; git checkout -- .; (exit $code)
32+
33+
- name: Ensure go run gen-accessors produces a zero diff
34+
shell: bash
35+
run: |
36+
cd bitbucket
37+
go run gen-accessors.go
38+
git diff --exit-code; code=$?; git checkout -- .; (exit $code)

.github/workflows/go.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)