From 243a978ffa7b3b8af084101ee441b7116becbde4 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 2 Dec 2019 12:36:08 +0530 Subject: [PATCH] add workflow for legacy v1 branch and add windows build --- .github/workflows/v1.yml | 54 ++++++++++++++++++++++++++++ .github/workflows/{ci.yml => v2.yml} | 2 +- 2 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/v1.yml rename .github/workflows/{ci.yml => v2.yml} (95%) diff --git a/.github/workflows/v1.yml b/.github/workflows/v1.yml new file mode 100644 index 0000000..3c91fd1 --- /dev/null +++ b/.github/workflows/v1.yml @@ -0,0 +1,54 @@ +name: Run Tests + +on: + pull_request: + branches: + v1 + +env: + GO111MODULE: on + GOPROXY: https://proxy.golang.org + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + go: [1.11, 1.12, 1.13] + name: ${{ matrix.os }} @ Go ${{ matrix.go }} + runs-on: ${{ matrix.os }} + steps: + - name: Set up Go ${{ matrix.go }} + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go }} + + - name: Set GOPATH and PATH + run: | + echo "##[set-env name=GOPATH;]$(dirname $GITHUB_WORKSPACE)" + echo "##[add-path]$(dirname $GITHUB_WORKSPACE)/bin" + shell: bash + + - name: Checkout Code + uses: actions/checkout@v1 + with: + ref: ${{ github.ref }} + + - name: Install Dependencies + run: | + go get github.com/urfave/gfmrun/cmd/gfmrun + go get golang.org/x/tools/cmd/goimports + go mod tidy + npm install markdown-toc + + - name: Run Tests + run: | + ls -la + go run build.go vet + go run build.go test + go run build.go gfmrun docs/v1/manual.md + go run build.go toc docs/v1/manual.md + + - name: Send Coverage Report + if: success() + run: bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/ci.yml b/.github/workflows/v2.yml similarity index 95% rename from .github/workflows/ci.yml rename to .github/workflows/v2.yml index 7213075..1f4fb49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/v2.yml @@ -13,7 +13,7 @@ jobs: test: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] go: [1.11, 1.12, 1.13] name: ${{ matrix.os }} @ Go ${{ matrix.go }} runs-on: ${{ matrix.os }}