From e4318de976b42ae3709add992d83e2925f945c14 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sun, 1 Dec 2019 13:11:49 +0530 Subject: [PATCH 01/27] initial action --- .github/workflows/go-workflow-1.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/go-workflow-1.yml diff --git a/.github/workflows/go-workflow-1.yml b/.github/workflows/go-workflow-1.yml new file mode 100644 index 0000000..b88209d --- /dev/null +++ b/.github/workflows/go-workflow-1.yml @@ -0,0 +1,25 @@ +name: v2 Test @ Go 1.11 + +on: + pull_request: + branches: + master + +jobs: + test: + name: Build & Test + runs-on: ubuntu-latest + steps: + - name: Install Dependencies + run: | + go get github.com/urfave/gfmrun/cmd/gfmrun + go get golang/x/tools/cmd/goimports + npm install markdown-toc + go mod tidy + + - name: Run Tests + run: | + 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 \ No newline at end of file From 74e0ced1758541a6c3bf09f8766a352e2dc204ba Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sun, 1 Dec 2019 13:15:16 +0530 Subject: [PATCH 02/27] add env and fix url for golang.org --- .github/workflows/go-workflow-1.yml | 76 +++++++++++++++++++++++++++-- .gitignore | 1 + .travis.yml | 36 -------------- appveyor.yml | 29 ----------- 4 files changed, 72 insertions(+), 70 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.github/workflows/go-workflow-1.yml b/.github/workflows/go-workflow-1.yml index b88209d..fc34e8d 100644 --- a/.github/workflows/go-workflow-1.yml +++ b/.github/workflows/go-workflow-1.yml @@ -1,4 +1,4 @@ -name: v2 Test @ Go 1.11 +name: Build and Test on: pull_request: @@ -6,16 +6,82 @@ on: master jobs: - test: - name: Build & Test + test1: + name: Test @ Go 1.11 runs-on: ubuntu-latest + env: + GO111MODULE: on + GOPROXY: https://proxy.golang.org steps: + - name: Set up Go 1.11 + uses: actions/setup-go@v1 + with: + go-version: 1.11 + + - name: Checkout Code + uses: actions/checkout@v1 + - name: Install Dependencies run: | go get github.com/urfave/gfmrun/cmd/gfmrun - go get golang/x/tools/cmd/goimports + go get golang.org/x/tools/cmd/goimports + npm install markdown-toc + + - name: Run Tests + run: | + 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 + test2: + name: Test @ Go 1.12 + runs-on: ubuntu-latest + env: + GO111MODULE: on + GOPROXY: https://proxy.golang.org + steps: + - name: Set up Go 1.12 + uses: actions/setup-go@v1 + with: + go-version: 1.12 + + - name: Checkout Code + uses: actions/checkout@v1 + + - 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: | + 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 + test3: + name: Test @ Go 1.13 + runs-on: ubuntu-latest + env: + GO111MODULE: on + GOPROXY: https://proxy.golang.org + steps: + - name: Set up Go 1.13 + uses: actions/setup-go@v1 + with: + go-version: 1.13 + + - 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 npm install markdown-toc - go mod tidy - name: Run Tests run: | diff --git a/.gitignore b/.gitignore index 501b8e8..b013e4a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ *.orig node_modules/ vendor +.idea diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9f61c62..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: go -sudo: false -dist: bionic -osx_image: xcode10 -go: - - 1.11.x - - 1.12.x - - 1.13.x - -os: - - linux - - osx - -env: - GO111MODULE=on GOPROXY=https://proxy.golang.org - -cache: - directories: - - node_modules - -before_script: - - go get github.com/urfave/gfmrun/cmd/gfmrun - - go get golang.org/x/tools/cmd/goimports - - npm install markdown-toc - - go mod tidy - -script: - - 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 - - go run build.go gfmrun docs/v2/manual.md - - go run build.go toc docs/v2/manual.md - -after_success: - - bash <(curl -s https://codecov.io/bash) diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d8f589b..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: "{build}" - -os: Windows Server 2016 - -image: Visual Studio 2017 - -clone_folder: c:\gopath\src\github.com\urfave\cli - -cache: - - node_modules - -environment: - GOPATH: C:\gopath - GOVERSION: 1.11.x - GO111MODULE: on - GOPROXY: https://proxy.golang.org - -install: - - set PATH=%GOPATH%\bin;C:\go\bin;%PATH% - - go version - - go env - - go get github.com/urfave/gfmrun/cmd/gfmrun - - go get golang.org/x/tools/cmd/goimports - - go mod tidy - -build_script: - - go run build.go vet - - go run build.go test - - go run build.go gfmrun docs/v1/manual.md From aae5025f279d7398adf68569931b1446bfa4bfe9 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sun, 1 Dec 2019 21:14:37 +0530 Subject: [PATCH 03/27] add matrix strategy --- .github/workflows/go-workflow-1.yml | 73 +++++------------------------ 1 file changed, 12 insertions(+), 61 deletions(-) diff --git a/.github/workflows/go-workflow-1.yml b/.github/workflows/go-workflow-1.yml index fc34e8d..e10cdc6 100644 --- a/.github/workflows/go-workflow-1.yml +++ b/.github/workflows/go-workflow-1.yml @@ -6,20 +6,26 @@ on: master jobs: - test1: - name: Test @ Go 1.11 - runs-on: ubuntu-latest + 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 }} env: GO111MODULE: on GOPROXY: https://proxy.golang.org steps: - - name: Set up Go 1.11 + - name: Set up Go ${{ matrix.go }} uses: actions/setup-go@v1 with: - go-version: 1.11 + go-version: ${{ matrix.go }} - name: Checkout Code uses: actions/checkout@v1 + with: + ref: ${{ github.ref }} - name: Install Dependencies run: | @@ -29,63 +35,8 @@ jobs: - name: Run Tests run: | + ls -la 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 - test2: - name: Test @ Go 1.12 - runs-on: ubuntu-latest - env: - GO111MODULE: on - GOPROXY: https://proxy.golang.org - steps: - - name: Set up Go 1.12 - uses: actions/setup-go@v1 - with: - go-version: 1.12 - - - name: Checkout Code - uses: actions/checkout@v1 - - - 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: | - 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 - test3: - name: Test @ Go 1.13 - runs-on: ubuntu-latest - env: - GO111MODULE: on - GOPROXY: https://proxy.golang.org - steps: - - name: Set up Go 1.13 - uses: actions/setup-go@v1 - with: - go-version: 1.13 - - - 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 - npm install markdown-toc - - - name: Run Tests - run: | - 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 \ No newline at end of file From b6d04dbae4bd2aab18b030e50c83d3e9ddbf7530 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sun, 1 Dec 2019 21:25:06 +0530 Subject: [PATCH 04/27] replace t.Logf with log.Printf, replace t.Log with log.Print and add gopath to bin --- .github/workflows/go-workflow-1.yml | 6 ++++++ app_test.go | 17 +++++++++-------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/go-workflow-1.yml b/.github/workflows/go-workflow-1.yml index e10cdc6..25249b4 100644 --- a/.github/workflows/go-workflow-1.yml +++ b/.github/workflows/go-workflow-1.yml @@ -22,6 +22,12 @@ jobs: 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: diff --git a/app_test.go b/app_test.go index bb0edb6..d1e5fc3 100644 --- a/app_test.go +++ b/app_test.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "io/ioutil" + "log" "os" "reflect" "strings" @@ -1422,7 +1423,7 @@ func TestApp_Run_CommandWithSubcommandHasHelpTopic(t *testing.T) { } for _, flagSet := range subcommandHelpTopics { - t.Logf("==> checking with flags %v", flagSet) + log.Printf("==> checking with flags %v", flagSet) app := &App{} buf := new(bytes.Buffer) @@ -1451,7 +1452,7 @@ func TestApp_Run_CommandWithSubcommandHasHelpTopic(t *testing.T) { } output := buf.String() - //t.Logf("output: %q\n", buf.Bytes()) + //log.Printf("output: %q\n", buf.Bytes()) if strings.Contains(output, "No help topic for") { t.Errorf("expect a help topic, got none: \n%q", output) @@ -1613,7 +1614,7 @@ func TestApp_Run_Help(t *testing.T) { for _, args := range helpArguments { buf := new(bytes.Buffer) - t.Logf("==> checking with arguments %v", args) + log.Printf("==> checking with arguments %v", args) app := &App{ Name: "boom", @@ -1631,7 +1632,7 @@ func TestApp_Run_Help(t *testing.T) { } output := buf.String() - t.Logf("output: %q\n", buf.Bytes()) + log.Printf("output: %q\n", buf.Bytes()) if !strings.Contains(output, "boom - make an explosive entrance") { t.Errorf("want help to contain %q, did not: \n%q", "boom - make an explosive entrance", output) @@ -1645,7 +1646,7 @@ func TestApp_Run_Version(t *testing.T) { for _, args := range versionArguments { buf := new(bytes.Buffer) - t.Logf("==> checking with arguments %v", args) + log.Printf("==> checking with arguments %v", args) app := &App{ Name: "boom", @@ -1664,7 +1665,7 @@ func TestApp_Run_Version(t *testing.T) { } output := buf.String() - t.Logf("output: %q\n", buf.Bytes()) + log.Printf("output: %q\n", buf.Bytes()) if !strings.Contains(output, "0.1.0") { t.Errorf("want version to contain %q, did not: \n%q", "0.1.0", output) @@ -1718,7 +1719,7 @@ func TestApp_Run_Categories(t *testing.T) { } output := buf.String() - //t.Logf("output: %q\n", buf.Bytes()) + //log.Printf("output: %q\n", buf.Bytes()) if !strings.Contains(output, "1:\n command1") { t.Errorf("want buffer to include category %q, did not: \n%q", "1:\n command1", output) @@ -2122,7 +2123,7 @@ func TestWhenExitSubCommandWithCodeThenAppQuitUnexpectedly(t *testing.T) { var exitCodeFromExitErrHandler int app.ExitErrHandler = func(c *Context, err error) { if exitErr, ok := err.(ExitCoder); ok { - t.Log(exitErr) + log.Print(exitErr) exitCodeFromExitErrHandler = exitErr.ExitCode() } } From 163d61a82a85ff3049fe0eadfd12c0cdb238a357 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sun, 1 Dec 2019 21:36:16 +0530 Subject: [PATCH 05/27] Finalize pipeline --- .github/workflows/{go-workflow-1.yml => ci.yml} | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) rename .github/workflows/{go-workflow-1.yml => ci.yml} (82%) diff --git a/.github/workflows/go-workflow-1.yml b/.github/workflows/ci.yml similarity index 82% rename from .github/workflows/go-workflow-1.yml rename to .github/workflows/ci.yml index 25249b4..cba564c 100644 --- a/.github/workflows/go-workflow-1.yml +++ b/.github/workflows/ci.yml @@ -1,21 +1,22 @@ -name: Build and Test +name: Run Tests on: pull_request: branches: master +env: + GO111MODULE: on + GOPROXY: https://proxy.golang.org + jobs: test: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] go: [1.11, 1.12, 1.13] - name: Test on ${{ matrix.os }} @ Go ${{ matrix.go }} + name: ${{ matrix.os }} @ Go ${{ matrix.go }} runs-on: ${{ matrix.os }} - env: - GO111MODULE: on - GOPROXY: https://proxy.golang.org steps: - name: Set up Go ${{ matrix.go }} uses: actions/setup-go@v1 @@ -37,6 +38,7 @@ jobs: run: | go get github.com/urfave/gfmrun/cmd/gfmrun go get golang.org/x/tools/cmd/goimports + go get ./... npm install markdown-toc - name: Run Tests From 2ddbeb63602c30aaa4fb0e265fa71062bee8da8c Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sun, 1 Dec 2019 22:59:04 +0530 Subject: [PATCH 06/27] add codecov --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cba564c..5be4034 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -48,3 +48,7 @@ jobs: go run build.go test go run build.go gfmrun docs/v2/manual.md go run build.go toc docs/v2/manual.md + + - name: Send Coverage Report + if: success() + run: bash <(curl -s https://codecov.io/bash) From 38f0d6342219359e07cd944af27fe425a4b00980 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sun, 1 Dec 2019 23:07:29 +0530 Subject: [PATCH 07/27] restore appveyor --- appveyor.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 appveyor.yml diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..6ae54b2 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,29 @@ +version: "{build}" + +os: Windows Server 2016 + +image: Visual Studio 2017 + +clone_folder: c:\gopath\src\github.com\urfave\cli + +cache: + - node_modules + +environment: + GOPATH: C:\gopath + GOVERSION: 1.11.x + GO111MODULE: on + GOPROXY: https://proxy.golang.org + +install: + - set PATH=%GOPATH%\bin;C:\go\bin;%PATH% + - go version + - go env + - go get github.com/urfave/gfmrun/cmd/gfmrun + - go get golang.org/x/tools/cmd/goimports + - go mod tidy + +build_script: + - go run build.go vet + - go run build.go test + - go run build.go gfmrun docs/v1/manual.md \ No newline at end of file From fc741e590b242fd1050f1e454a922d577896a790 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 2 Dec 2019 12:27:17 +0530 Subject: [PATCH 08/27] fix failing build --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5be4034..7213075 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: run: | go get github.com/urfave/gfmrun/cmd/gfmrun go get golang.org/x/tools/cmd/goimports - go get ./... + go mod tidy npm install markdown-toc - name: Run Tests From 243a978ffa7b3b8af084101ee441b7116becbde4 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 2 Dec 2019 12:36:08 +0530 Subject: [PATCH 09/27] 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 }} From 4f01e0b1133d7154f722cd3e6ba1d1612ad33cf9 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 2 Dec 2019 14:33:48 +0530 Subject: [PATCH 10/27] update codecov token --- .github/workflows/v1.yml | 4 +++- .github/workflows/v2.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/v1.yml b/.github/workflows/v1.yml index 3c91fd1..b92f0e3 100644 --- a/.github/workflows/v1.yml +++ b/.github/workflows/v1.yml @@ -13,7 +13,7 @@ jobs: test: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] go: [1.11, 1.12, 1.13] name: ${{ matrix.os }} @ Go ${{ matrix.go }} runs-on: ${{ matrix.os }} @@ -51,4 +51,6 @@ jobs: - name: Send Coverage Report if: success() + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: bash <(curl -s https://codecov.io/bash) diff --git a/.github/workflows/v2.yml b/.github/workflows/v2.yml index 1f4fb49..4befdf9 100644 --- a/.github/workflows/v2.yml +++ b/.github/workflows/v2.yml @@ -13,7 +13,7 @@ jobs: test: strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest] go: [1.11, 1.12, 1.13] name: ${{ matrix.os }} @ Go ${{ matrix.go }} runs-on: ${{ matrix.os }} @@ -51,4 +51,6 @@ jobs: - name: Send Coverage Report if: success() + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} run: bash <(curl -s https://codecov.io/bash) From 0a48e331ba19002356e5d308d337bc26b9893611 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Mon, 2 Dec 2019 15:05:59 +0530 Subject: [PATCH 11/27] remove ls --- .github/workflows/v1.yml | 1 - .github/workflows/v2.yml | 1 - 2 files changed, 2 deletions(-) diff --git a/.github/workflows/v1.yml b/.github/workflows/v1.yml index b92f0e3..280b299 100644 --- a/.github/workflows/v1.yml +++ b/.github/workflows/v1.yml @@ -43,7 +43,6 @@ jobs: - 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 diff --git a/.github/workflows/v2.yml b/.github/workflows/v2.yml index 4befdf9..b43e780 100644 --- a/.github/workflows/v2.yml +++ b/.github/workflows/v2.yml @@ -43,7 +43,6 @@ jobs: - name: Run Tests run: | - ls -la go run build.go vet go run build.go test go run build.go gfmrun docs/v2/manual.md From 1d26371246e6a49596ca60262c5ae87416a3ed47 Mon Sep 17 00:00:00 2001 From: "lynn [they]" Date: Mon, 2 Dec 2019 23:53:18 -0800 Subject: [PATCH 12/27] Create stale.yml --- .github/stale.yml | 63 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..50af4e8 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,63 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an Issue or Pull Request becomes stale +daysUntilStale: 90 + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. +# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. +daysUntilClose: 30 + +# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) +onlyLabels: [] + +# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable +exemptLabels: + - pinned + - security + - "type: maintenance" + +# Set to true to ignore issues in a project (defaults to false) +exemptProjects: false + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: false + +# Set to true to ignore issues with an assignee (defaults to false) +exemptAssignees: false + +# Label to use when marking as stale +staleLabel: "status: stale" + +# Comment to post when marking as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. Please add a comment bumping this issue if you're still + interested in it's resolution! Thanks for your help, please let us know + if you need anything else. + +# Comment to post when removing the stale label. +unmarkComment: > + This issue has been bumped and is no longer marked as stale! Feel free + to bump it again in the future, if it's still relevant. + +# Comment to post when closing a stale Issue or Pull Request. +# closeComment: > +# Your comment here. + +# Limit the number of actions per hour, from 1-30. Default is 30 +limitPerRun: 30 + +# Limit to only `issues` or `pulls` +# only: issues + +# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': +# pulls: +# daysUntilStale: 30 +# markComment: > +# This pull request has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. + +# issues: +# exemptLabels: +# - confirmed From 93911a08af70baab728da0637da8c5524210bb75 Mon Sep 17 00:00:00 2001 From: "lynn [they]" Date: Mon, 2 Dec 2019 23:56:35 -0800 Subject: [PATCH 13/27] Update stale.yml --- .github/stale.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 50af4e8..563a9b5 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -30,19 +30,19 @@ staleLabel: "status: stale" # Comment to post when marking as stale. Set to `false` to disable markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. Please add a comment bumping this issue if you're still + This issue or PR has been automatically marked as stale because it has not had + recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else. # Comment to post when removing the stale label. unmarkComment: > - This issue has been bumped and is no longer marked as stale! Feel free + This issue or PR has been bumped and is no longer marked as stale! Feel free to bump it again in the future, if it's still relevant. # Comment to post when closing a stale Issue or Pull Request. -# closeComment: > -# Your comment here. +closeComment: > + Closing this as it has become stale. # Limit the number of actions per hour, from 1-30. Default is 30 limitPerRun: 30 From 322fc3bed1809802649dac769f655bdd830103ce Mon Sep 17 00:00:00 2001 From: Marwan Sulaiman Date: Wed, 4 Dec 2019 15:35:53 -0500 Subject: [PATCH 14/27] add RunWithContext + remove signal cancellation --- app.go | 10 +++++++++- context.go | 12 +----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/app.go b/app.go index a62aa23..87443ef 100644 --- a/app.go +++ b/app.go @@ -1,6 +1,7 @@ package cli import ( + "context" "flag" "fmt" "io" @@ -207,6 +208,13 @@ func (a *App) useShortOptionHandling() bool { // Run is the entry point to the cli app. Parses the arguments slice and routes // to the proper flag/args combination func (a *App) Run(arguments []string) (err error) { + return a.RunWithContext(context.Background(), arguments) +} + +// RunWithContext is like Run except it takes a Context that will be +// passed to its commands and sub-commands. Through this, you can +// propagate timeouts and cancellation requests +func (a *App) RunWithContext(ctx context.Context, arguments []string) (err error) { a.Setup() // handle the completion flag separately from the flagset since @@ -224,7 +232,7 @@ func (a *App) Run(arguments []string) (err error) { err = parseIter(set, a, arguments[1:], shellComplete) nerr := normalizeFlags(a.Flags, set) - context := NewContext(a, set, nil) + context := NewContext(a, set, &Context{Context: ctx}) if nerr != nil { _, _ = fmt.Fprintln(a.Writer, nerr) _ = ShowAppHelp(context) diff --git a/context.go b/context.go index 13fb523..5b59e75 100644 --- a/context.go +++ b/context.go @@ -5,10 +5,7 @@ import ( "errors" "flag" "fmt" - "os" - "os/signal" "strings" - "syscall" ) // Context is a type that is passed through to @@ -36,14 +33,7 @@ func NewContext(app *App, set *flag.FlagSet, parentCtx *Context) *Context { c.Command = &Command{} if c.Context == nil { - ctx, cancel := context.WithCancel(context.Background()) - go func() { - defer cancel() - sigs := make(chan os.Signal, 1) - signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) - <-sigs - }() - c.Context = ctx + c.Context = context.Background() } return c From eb35e4d3c7104a596b2b378ef896c68be2be64ad Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 5 Dec 2019 23:14:25 +0530 Subject: [PATCH 15/27] combine workflow files for v1 and v2, and use pre-compiled binary for gfmrun --- .github/workflows/{v2.yml => cli.yml} | 16 ++++++-- .github/workflows/v1.yml | 55 --------------------------- 2 files changed, 12 insertions(+), 59 deletions(-) rename .github/workflows/{v2.yml => cli.yml} (70%) delete mode 100644 .github/workflows/v1.yml diff --git a/.github/workflows/v2.yml b/.github/workflows/cli.yml similarity index 70% rename from .github/workflows/v2.yml rename to .github/workflows/cli.yml index b43e780..f3bba61 100644 --- a/.github/workflows/v2.yml +++ b/.github/workflows/cli.yml @@ -4,6 +4,7 @@ on: pull_request: branches: master + v1 env: GO111MODULE: on @@ -36,12 +37,19 @@ jobs: - name: Install Dependencies run: | - go get github.com/urfave/gfmrun/cmd/gfmrun - go get golang.org/x/tools/cmd/goimports - go mod tidy + curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $(dirname $GITHUB_WORKSPACE)/bin/gfmrun -i - npm install markdown-toc - - name: Run Tests + - name: Run Tests (v1) + if: contains(github.ref, 'v1') + run: | + 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: Run Tests (v2) + if: contains(github.ref, 'master') run: | go run build.go vet go run build.go test diff --git a/.github/workflows/v1.yml b/.github/workflows/v1.yml deleted file mode 100644 index 280b299..0000000 --- a/.github/workflows/v1.yml +++ /dev/null @@ -1,55 +0,0 @@ -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] - 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: | - 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() - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - run: bash <(curl -s https://codecov.io/bash) From 63d19b6c5c23f6aa9dde149c3ff6aabdd7b4f26c Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 5 Dec 2019 23:17:45 +0530 Subject: [PATCH 16/27] remove comments --- app_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/app_test.go b/app_test.go index d1e5fc3..7a02d65 100644 --- a/app_test.go +++ b/app_test.go @@ -1452,7 +1452,6 @@ func TestApp_Run_CommandWithSubcommandHasHelpTopic(t *testing.T) { } output := buf.String() - //log.Printf("output: %q\n", buf.Bytes()) if strings.Contains(output, "No help topic for") { t.Errorf("expect a help topic, got none: \n%q", output) @@ -1719,7 +1718,6 @@ func TestApp_Run_Categories(t *testing.T) { } output := buf.String() - //log.Printf("output: %q\n", buf.Bytes()) if !strings.Contains(output, "1:\n command1") { t.Errorf("want buffer to include category %q, did not: \n%q", "1:\n command1", output) From 59babefa342d3d753871a70583d5886489363baa Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 5 Dec 2019 23:17:53 +0530 Subject: [PATCH 17/27] fix syntax for multiple branches --- .github/workflows/cli.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index f3bba61..1b79bbe 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -3,8 +3,8 @@ name: Run Tests on: pull_request: branches: - master - v1 + - master + - v1 env: GO111MODULE: on From 88812bd56f96007ba7280c0670183b6e630ed13c Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 5 Dec 2019 23:21:55 +0530 Subject: [PATCH 18/27] fix path --- .github/workflows/cli.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 1b79bbe..321760b 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -37,7 +37,7 @@ jobs: - name: Install Dependencies run: | - curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $(dirname $GITHUB_WORKSPACE)/bin/gfmrun -i - + curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $(dirname $GOPATH)/bin/gfmrun -i - npm install markdown-toc - name: Run Tests (v1) From 7169ab606297436650938aef32cc3f8f09003d07 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 5 Dec 2019 23:25:26 +0530 Subject: [PATCH 19/27] fix gopath --- .github/workflows/cli.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 321760b..7958801 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -37,7 +37,7 @@ jobs: - name: Install Dependencies run: | - curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $(dirname $GOPATH)/bin/gfmrun -i - + curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - npm install markdown-toc - name: Run Tests (v1) From 078d14335a8a179ebdb8dbb231f2fec268afdfad Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Thu, 5 Dec 2019 23:27:48 +0530 Subject: [PATCH 20/27] create gopath/bin dir --- .github/workflows/cli.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 7958801..f0ce60e 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -37,6 +37,7 @@ jobs: - name: Install Dependencies run: | + mkdir -p $GOPATH/bin curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - npm install markdown-toc From ccb0e89075d4a61dbf2076339d735b58b571ebaa Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Fri, 6 Dec 2019 10:12:58 +0530 Subject: [PATCH 21/27] fix no tests running --- .github/workflows/cli.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index f0ce60e..0de033f 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -35,14 +35,22 @@ jobs: with: ref: ${{ github.ref }} - - name: Install Dependencies + - name: Install Dependencies (Linux) + if: matrix.os == 'ubuntu-latest' run: | mkdir -p $GOPATH/bin curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - npm install markdown-toc + - name: Install Dependencies (Mac) + if: matrix.os == 'ubuntu-latest' + run: | + mkdir -p $GOPATH/bin + curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-darwin-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - + npm install markdown-toc + - name: Run Tests (v1) - if: contains(github.ref, 'v1') + if: contains(github.base_ref, 'v1') run: | go run build.go vet go run build.go test @@ -50,7 +58,7 @@ jobs: go run build.go toc docs/v1/manual.md - name: Run Tests (v2) - if: contains(github.ref, 'master') + if: contains(github.base_ref, 'master') run: | go run build.go vet go run build.go test From 1a724c9d6e6966bef07579a36bae748e387944a7 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Fri, 6 Dec 2019 10:13:18 +0530 Subject: [PATCH 22/27] revert log.Printf to t.Logf --- .github/workflows/cli.yml | 2 ++ app_test.go | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 0de033f..8ac3f80 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -40,6 +40,7 @@ jobs: run: | mkdir -p $GOPATH/bin curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - + chmod +x $GOPATH/bin/gfmrun npm install markdown-toc - name: Install Dependencies (Mac) @@ -47,6 +48,7 @@ jobs: run: | mkdir -p $GOPATH/bin curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-darwin-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - + chmod +x $GOPATH/bin/gfmrun npm install markdown-toc - name: Run Tests (v1) diff --git a/app_test.go b/app_test.go index 7a02d65..e675eb2 100644 --- a/app_test.go +++ b/app_test.go @@ -1423,7 +1423,7 @@ func TestApp_Run_CommandWithSubcommandHasHelpTopic(t *testing.T) { } for _, flagSet := range subcommandHelpTopics { - log.Printf("==> checking with flags %v", flagSet) + t.Logf("==> checking with flags %v", flagSet) app := &App{} buf := new(bytes.Buffer) @@ -1613,7 +1613,7 @@ func TestApp_Run_Help(t *testing.T) { for _, args := range helpArguments { buf := new(bytes.Buffer) - log.Printf("==> checking with arguments %v", args) + t.Logf("==> checking with arguments %v", args) app := &App{ Name: "boom", @@ -1631,7 +1631,7 @@ func TestApp_Run_Help(t *testing.T) { } output := buf.String() - log.Printf("output: %q\n", buf.Bytes()) + t.Logf("output: %q\n", buf.Bytes()) if !strings.Contains(output, "boom - make an explosive entrance") { t.Errorf("want help to contain %q, did not: \n%q", "boom - make an explosive entrance", output) @@ -1645,7 +1645,7 @@ func TestApp_Run_Version(t *testing.T) { for _, args := range versionArguments { buf := new(bytes.Buffer) - log.Printf("==> checking with arguments %v", args) + t.Logf("==> checking with arguments %v", args) app := &App{ Name: "boom", @@ -1664,7 +1664,7 @@ func TestApp_Run_Version(t *testing.T) { } output := buf.String() - log.Printf("output: %q\n", buf.Bytes()) + t.Logf("output: %q\n", buf.Bytes()) if !strings.Contains(output, "0.1.0") { t.Errorf("want version to contain %q, did not: \n%q", "0.1.0", output) From bac545cf3dff3215ceccb898028fcda2b6a6e70f Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Fri, 6 Dec 2019 10:18:30 +0530 Subject: [PATCH 23/27] fix macos typo --- .github/workflows/cli.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index 8ac3f80..d4f9cdb 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -44,12 +44,12 @@ jobs: npm install markdown-toc - name: Install Dependencies (Mac) - if: matrix.os == 'ubuntu-latest' - run: | - mkdir -p $GOPATH/bin - curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-darwin-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - - chmod +x $GOPATH/bin/gfmrun - npm install markdown-toc + if: matrix.os == 'macos-latest' + run: | + mkdir -p $GOPATH/bin + curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-darwin-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - + chmod +x $GOPATH/bin/gfmrun + npm install markdown-toc - name: Run Tests (v1) if: contains(github.base_ref, 'v1') From 7daa2d133e094ef5978e786e9af833a4cd65745e Mon Sep 17 00:00:00 2001 From: Marwan Sulaiman Date: Fri, 6 Dec 2019 01:20:48 -0500 Subject: [PATCH 24/27] RunWithContext -> RunContext --- app.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app.go b/app.go index 87443ef..09b13be 100644 --- a/app.go +++ b/app.go @@ -208,13 +208,13 @@ func (a *App) useShortOptionHandling() bool { // Run is the entry point to the cli app. Parses the arguments slice and routes // to the proper flag/args combination func (a *App) Run(arguments []string) (err error) { - return a.RunWithContext(context.Background(), arguments) + return a.RunContext(context.Background(), arguments) } -// RunWithContext is like Run except it takes a Context that will be +// RunContext is like Run except it takes a Context that will be // passed to its commands and sub-commands. Through this, you can // propagate timeouts and cancellation requests -func (a *App) RunWithContext(ctx context.Context, arguments []string) (err error) { +func (a *App) RunContext(ctx context.Context, arguments []string) (err error) { a.Setup() // handle the completion flag separately from the flagset since From 969535eec606fc699db382e4e28221ff11c653d5 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sat, 7 Dec 2019 12:15:17 +0530 Subject: [PATCH 25/27] replace log.Print with t.Log --- app_test.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/app_test.go b/app_test.go index 7a02d65..53e78b7 100644 --- a/app_test.go +++ b/app_test.go @@ -7,7 +7,6 @@ import ( "fmt" "io" "io/ioutil" - "log" "os" "reflect" "strings" @@ -1423,7 +1422,7 @@ func TestApp_Run_CommandWithSubcommandHasHelpTopic(t *testing.T) { } for _, flagSet := range subcommandHelpTopics { - log.Printf("==> checking with flags %v", flagSet) + t.Logf("==> checking with flags %v", flagSet) app := &App{} buf := new(bytes.Buffer) @@ -1613,7 +1612,7 @@ func TestApp_Run_Help(t *testing.T) { for _, args := range helpArguments { buf := new(bytes.Buffer) - log.Printf("==> checking with arguments %v", args) + t.Logf("==> checking with arguments %v", args) app := &App{ Name: "boom", @@ -1631,7 +1630,7 @@ func TestApp_Run_Help(t *testing.T) { } output := buf.String() - log.Printf("output: %q\n", buf.Bytes()) + t.Logf("output: %q\n", buf.Bytes()) if !strings.Contains(output, "boom - make an explosive entrance") { t.Errorf("want help to contain %q, did not: \n%q", "boom - make an explosive entrance", output) @@ -1645,7 +1644,7 @@ func TestApp_Run_Version(t *testing.T) { for _, args := range versionArguments { buf := new(bytes.Buffer) - log.Printf("==> checking with arguments %v", args) + t.Logf("==> checking with arguments %v", args) app := &App{ Name: "boom", @@ -1664,7 +1663,7 @@ func TestApp_Run_Version(t *testing.T) { } output := buf.String() - log.Printf("output: %q\n", buf.Bytes()) + t.Logf("output: %q\n", buf.Bytes()) if !strings.Contains(output, "0.1.0") { t.Errorf("want version to contain %q, did not: \n%q", "0.1.0", output) @@ -2121,7 +2120,7 @@ func TestWhenExitSubCommandWithCodeThenAppQuitUnexpectedly(t *testing.T) { var exitCodeFromExitErrHandler int app.ExitErrHandler = func(c *Context, err error) { if exitErr, ok := err.(ExitCoder); ok { - log.Print(exitErr) + t.Log(exitErr) exitCodeFromExitErrHandler = exitErr.ExitCode() } } From 0dcb2597ce9a53fda9059140328bb178029841a5 Mon Sep 17 00:00:00 2001 From: Ajitem Sahasrabuddhe Date: Sat, 7 Dec 2019 12:17:22 +0530 Subject: [PATCH 26/27] pin gfmrun to version --- .github/workflows/cli.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cli.yml b/.github/workflows/cli.yml index f0ce60e..4c1bec5 100644 --- a/.github/workflows/cli.yml +++ b/.github/workflows/cli.yml @@ -26,8 +26,8 @@ jobs: - name: Set GOPATH and PATH run: | - echo "##[set-env name=GOPATH;]$(dirname $GITHUB_WORKSPACE)" - echo "##[add-path]$(dirname $GITHUB_WORKSPACE)/bin" + echo "::set-env name=GOPATH::$(dirname $GITHUB_WORKSPACE)" + echo "::add-path::$(dirname $GITHUB_WORKSPACE)/bin" shell: bash - name: Checkout Code @@ -38,7 +38,8 @@ jobs: - name: Install Dependencies run: | mkdir -p $GOPATH/bin - curl -s https://api.github.com/repos/urfave/gfmrun/releases/latest | grep gfmrun-linux-amd64 | grep download | cut -d '"' -f 4 | wget -O $GOPATH/bin/gfmrun -i - + curl -L -o $GOPATH/bin/gfmrun "https://github.com/urfave/gfmrun/releases/download/v1.2.14/gfmrun-$(go env GOOS)-amd64-v1.2.14" + chmod +x $GOPATH/bin/gfmrun npm install markdown-toc - name: Run Tests (v1) From 4af0b06f682bf252950b8f90583e3ea55f02f50e Mon Sep 17 00:00:00 2001 From: "lynn [they]" Date: Sat, 7 Dec 2019 15:21:14 -0800 Subject: [PATCH 27/27] Create .codecov.yml --- .github/.codecov.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/.codecov.yml diff --git a/.github/.codecov.yml b/.github/.codecov.yml new file mode 100644 index 0000000..69cb760 --- /dev/null +++ b/.github/.codecov.yml @@ -0,0 +1 @@ +comment: false