mirror of
https://github.com/go-task/task.git
synced 2025-08-10 22:42:19 +02:00
Improve GitHub Action and also test Go 1.12
This commit is contained in:
61
.github/workflows/test.yml
vendored
61
.github/workflows/test.yml
vendored
@@ -1,59 +1,30 @@
|
|||||||
name: Test
|
name: Test
|
||||||
on: [push]
|
on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
linux:
|
test:
|
||||||
name: Linux
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
strategy:
|
||||||
|
matrix:
|
||||||
|
go-version: [1.12.x, 1.13.x]
|
||||||
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||||
|
runs-on: ${{matrix.platform}}
|
||||||
steps:
|
steps:
|
||||||
- name: Set up Go 1.13
|
- name: Set up Go ${{matrix.go-version}}
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v1
|
||||||
with:
|
with:
|
||||||
go-version: 1.13
|
go-version: ${{matrix.go-version}}
|
||||||
id: go
|
id: go
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v1
|
uses: actions/checkout@v1
|
||||||
|
|
||||||
- name: Build
|
- name: Download Go modules
|
||||||
run: go build -o ./task -v ./cmd/task
|
run: go mod download
|
||||||
|
env:
|
||||||
- name: Test
|
GOPROXY: https://proxy.golang.org
|
||||||
run: ./task test
|
|
||||||
|
|
||||||
windows:
|
|
||||||
name: Windows
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- name: Set up Go 1.13
|
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
|
||||||
go-version: 1.13
|
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: go install -v ./cmd/task
|
run: go build -o ./bin/task -v ./cmd/task
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: go test -v ./...
|
run: ./bin/task test
|
||||||
|
|
||||||
macos:
|
|
||||||
name: MacOS
|
|
||||||
runs-on: macOS-latest
|
|
||||||
steps:
|
|
||||||
- name: Set up Go 1.13
|
|
||||||
uses: actions/setup-go@v1
|
|
||||||
with:
|
|
||||||
go-version: 1.13
|
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
|
||||||
uses: actions/checkout@v1
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: go build -o ./task -v ./cmd/task
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: ./task test
|
|
||||||
|
Reference in New Issue
Block a user