mirror of
https://github.com/go-task/task.git
synced 2025-03-17 21:08:01 +02:00
Improve GitHub Action and also test Go 1.12
This commit is contained in:
parent
84da80356d
commit
67ae6f210f
61
.github/workflows/test.yml
vendored
61
.github/workflows/test.yml
vendored
@ -1,59 +1,30 @@
|
||||
name: Test
|
||||
on: [push]
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
linux:
|
||||
name: Linux
|
||||
runs-on: ubuntu-latest
|
||||
test:
|
||||
name: Test
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.12.x, 1.13.x]
|
||||
platform: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{matrix.platform}}
|
||||
steps:
|
||||
- name: Set up Go 1.13
|
||||
- name: Set up Go ${{matrix.go-version}}
|
||||
uses: actions/setup-go@v1
|
||||
with:
|
||||
go-version: 1.13
|
||||
go-version: ${{matrix.go-version}}
|
||||
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
|
||||
|
||||
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: Download Go modules
|
||||
run: go mod download
|
||||
env:
|
||||
GOPROXY: https://proxy.golang.org
|
||||
|
||||
- name: Build
|
||||
run: go install -v ./cmd/task
|
||||
run: go build -o ./bin/task -v ./cmd/task
|
||||
|
||||
- name: Test
|
||||
run: go test -v ./...
|
||||
|
||||
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
|
||||
run: ./bin/task test
|
||||
|
Loading…
x
Reference in New Issue
Block a user