urfave-cli/.github/workflows/go-workflow-1.yml

49 lines
1.2 KiB
YAML
Raw Normal View History

2019-12-01 07:45:16 +00:00
name: Build and Test
2019-12-01 07:41:49 +00:00
on:
pull_request:
branches:
master
jobs:
2019-12-01 15:44:37 +00:00
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
go: [1.11, 1.12, 1.13]
name: Test on ${{ matrix.os }} @ Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
2019-12-01 07:45:16 +00:00
env:
GO111MODULE: on
GOPROXY: https://proxy.golang.org
2019-12-01 07:41:49 +00:00
steps:
2019-12-01 15:44:37 +00:00
- name: Set up Go ${{ matrix.go }}
2019-12-01 07:45:16 +00:00
uses: actions/setup-go@v1
with:
2019-12-01 15:44:37 +00:00
go-version: ${{ matrix.go }}
2019-12-01 07:45:16 +00:00
- name: Set GOPATH and PATH
run: |
echo "##[set-env name=GOPATH;]$(dirname $GITHUB_WORKSPACE)"
echo "##[add-path]$(dirname $GITHUB_WORKSPACE)/bin"
shell: bash
2019-12-01 07:45:16 +00:00
- name: Checkout Code
uses: actions/checkout@v1
with:
2019-12-01 15:44:37 +00:00
ref: ${{ github.ref }}
2019-12-01 07:45:16 +00:00
- name: Install Dependencies
run: |
go get github.com/urfave/gfmrun/cmd/gfmrun
go get golang.org/x/tools/cmd/goimports
npm install markdown-toc
- name: Run Tests
run: |
2019-12-01 15:44:37 +00:00
ls -la
2019-12-01 07:45:16 +00:00
go run build.go vet
go run build.go test
go run build.go gfmrun docs/v2/manual.md
go run build.go toc docs/v2/manual.md