]> 127.0.0.1 Git - part/.git/commitdiff
Create go.yml
authorqydysky <32743305+qydysky@users.noreply.github.com>
Sun, 26 Jul 2020 01:34:46 +0000 (09:34 +0800)
committerGitHub <noreply@github.com>
Sun, 26 Jul 2020 01:34:46 +0000 (09:34 +0800)
.github/workflows/go.yml [new file with mode: 0644]

diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml
new file mode 100644 (file)
index 0000000..e151abf
--- /dev/null
@@ -0,0 +1,34 @@
+name: Go
+
+on:
+  push:
+    branches: [ master ]
+  pull_request:
+    branches: [ master ]
+
+jobs:
+
+  build:
+    name: Build
+    runs-on: ubuntu-latest
+    steps:
+
+    - name: Set up Go 1.x
+      uses: actions/setup-go@v2
+      with:
+        go-version: ^1.13
+      id: go
+
+    - name: Check out code into the Go module directory
+      uses: actions/checkout@v2
+
+    - name: Get dependencies
+      run: |
+        go get -v -t -d ./...
+        if [ -f Gopkg.toml ]; then
+            curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
+            dep ensure
+        fi
+
+    - name: Test
+      run: go test -v .