Skip to content

Commit fc6f9ac

Browse files
kevinburke1kevinburke
authored andcommitted
.github: add test workflow
1 parent b61ce1a commit fc6f9ac

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
on: [push, pull_request]
2+
name: Test
3+
jobs:
4+
test:
5+
strategy:
6+
matrix:
7+
go-version: [1.13.x, 1.14.x]
8+
platform: [ubuntu-latest]
9+
runs-on: ${{ matrix.platform }}
10+
steps:
11+
- name: Install Go
12+
uses: actions/setup-go@master
13+
with:
14+
go-version: ${{ matrix.go-version }}
15+
- uses: actions/checkout@master
16+
with:
17+
path: './src/github.com/github-release/github-release'
18+
# staticcheck needs this for GOPATH
19+
- run: echo "::set-env name=GOPATH::$GITHUB_WORKSPACE"
20+
- run: echo "::set-env name=PATH::$GITHUB_WORKSPACE/bin:$PATH"
21+
- name: Download dependencies
22+
run: go get -t -v ./...
23+
working-directory: './src/github.com/github-release/github-release'
24+
- name: Run tests
25+
run: make test
26+
working-directory: './src/github.com/github-release/github-release'

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,7 @@ clean:
8080
rm $(EXECUTABLE) || true
8181
rm -rf bin/
8282

83+
test:
84+
go test ./...
85+
8386
.PHONY: clean release dep install

0 commit comments

Comments
 (0)