File tree 5 files changed +50
-1
lines changed
5 files changed +50
-1
lines changed Original file line number Diff line number Diff line change
1
+ on : [push, pull_request]
2
+ name : Test
3
+ jobs :
4
+ test :
5
+ strategy :
6
+ matrix :
7
+ go-version : [1.12.9, 1.13]
8
+ platform : [ubuntu-latest, macos-latest, windows-latest]
9
+ runs-on : ${{ matrix.platform }}
10
+ steps :
11
+ - name : Install Go
12
+ uses : actions/setup-go@v1
13
+ with :
14
+ go-version : ${{ matrix.go-version }}
15
+ - name : Checkout code
16
+ uses : actions/checkout@v1
17
+ - name : Test
18
+ run : go test ./...
Original file line number Diff line number Diff line change 2
2
3
3
[ GitHub Actions] ( https://github.com/features/actions ) includes CI/CD for free
4
4
for Open Source repositories. This document contains information on making it
5
- work well for [ Go] ( https://github.com/features/actions ) .
5
+ work well for [ Go] ( https://github.com/features/actions ) . See them [ in
6
+ action] ( https://github.com/mvdan/github-actions-golang/actions ) :
6
7
7
8
```
8
9
$ cat .github/workflows/test.yml
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2019, Daniel Martí <mvdan@mvdan.cc>
2
+ // See LICENSE for licensing information
3
+
4
+ package actions
5
+
6
+ import (
7
+ "fmt"
8
+ "runtime"
9
+ )
10
+
11
+ func Demo () {
12
+ fmt .Printf ("Go version: %s\n " , runtime .Version ())
13
+ fmt .Printf ("GOOS: %s\n " , runtime .GOOS )
14
+ fmt .Printf ("GOARCH: %s\n " , runtime .GOARCH )
15
+ }
Original file line number Diff line number Diff line change
1
+ // Copyright (c) 2019, Daniel Martí <mvdan@mvdan.cc>
2
+ // See LICENSE for licensing information
3
+
4
+ package actions
5
+
6
+ import (
7
+ "testing"
8
+ )
9
+
10
+ func TestDemo (t * testing.T ) {
11
+ Demo ()
12
+ }
Original file line number Diff line number Diff line change
1
+ module dummy.module/actions
2
+
3
+ go 1.13
You can’t perform that action at this time.
0 commit comments