You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.2 KiB
51 lines
1.2 KiB
5 years ago
|
name: Run Tests
|
||
5 years ago
|
|
||
|
on:
|
||
|
pull_request:
|
||
|
branches:
|
||
|
master
|
||
|
|
||
5 years ago
|
env:
|
||
|
GO111MODULE: on
|
||
|
GOPROXY: https://proxy.golang.org
|
||
|
|
||
5 years ago
|
jobs:
|
||
5 years ago
|
test:
|
||
|
strategy:
|
||
|
matrix:
|
||
5 years ago
|
os: [ubuntu-latest, macos-latest]
|
||
5 years ago
|
go: [1.11, 1.12, 1.13]
|
||
5 years ago
|
name: ${{ matrix.os }} @ Go ${{ matrix.go }}
|
||
5 years ago
|
runs-on: ${{ matrix.os }}
|
||
5 years ago
|
steps:
|
||
5 years ago
|
- name: Set up Go ${{ matrix.go }}
|
||
5 years ago
|
uses: actions/setup-go@v1
|
||
|
with:
|
||
5 years ago
|
go-version: ${{ matrix.go }}
|
||
5 years ago
|
|
||
5 years ago
|
- name: Set GOPATH and PATH
|
||
|
run: |
|
||
|
echo "##[set-env name=GOPATH;]$(dirname $GITHUB_WORKSPACE)"
|
||
|
echo "##[add-path]$(dirname $GITHUB_WORKSPACE)/bin"
|
||
|
shell: bash
|
||
|
|
||
5 years ago
|
- name: Checkout Code
|
||
|
uses: actions/checkout@v1
|
||
|
with:
|
||
5 years ago
|
ref: ${{ github.ref }}
|
||
5 years ago
|
|
||
|
- name: Install Dependencies
|
||
|
run: |
|
||
|
go get github.com/urfave/gfmrun/cmd/gfmrun
|
||
|
go get golang.org/x/tools/cmd/goimports
|
||
5 years ago
|
go get ./...
|
||
5 years ago
|
npm install markdown-toc
|
||
|
|
||
|
- name: Run Tests
|
||
|
run: |
|
||
5 years ago
|
ls -la
|
||
5 years ago
|
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
|