From 9e11ef95c870edf1e72a75fe1b769178f96f4191 Mon Sep 17 00:00:00 2001 From: Daniel Steuernol Date: Fri, 3 Jan 2020 15:12:48 -0800 Subject: [PATCH 1/4] Allow ci to run against pr (#7) --- .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 cdd79cc..fceb983 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,6 @@ name: CI -on: [push] +on: [push, pull_request] jobs: From 6af2480a30b0331fa5ad56bb930e46d667f8f5fa Mon Sep 17 00:00:00 2001 From: Brad Van Vugt <1531419+bvanvugt@users.noreply.github.com> Date: Fri, 3 Jan 2020 15:32:27 -0800 Subject: [PATCH 2/4] Update and rename ci.yml to main.yml --- .github/workflows/{ci.yml => main.yml} | 1 + 1 file changed, 1 insertion(+) rename .github/workflows/{ci.yml => main.yml} (96%) diff --git a/.github/workflows/ci.yml b/.github/workflows/main.yml similarity index 96% rename from .github/workflows/ci.yml rename to .github/workflows/main.yml index fceb983..d99cea8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/main.yml @@ -41,6 +41,7 @@ jobs: - name: go test run: go test -race -coverprofile=coverage.txt ./... - name: upload to codecov + if: github.event_name == 'push' uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} From fb95123bb6d47bc20674b64e9f562fa33152a34a Mon Sep 17 00:00:00 2001 From: Brad Van Vugt <1531419+bvanvugt@users.noreply.github.com> Date: Fri, 3 Jan 2020 15:35:40 -0800 Subject: [PATCH 3/4] Update main.yml --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d99cea8..956684a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,4 +1,4 @@ -name: CI +name: Main on: [push, pull_request] From 2f7df375f7f45c4e3369874884d687ed227664ff Mon Sep 17 00:00:00 2001 From: Brad Van Vugt <1531419+bvanvugt@users.noreply.github.com> Date: Fri, 3 Jan 2020 15:42:02 -0800 Subject: [PATCH 4/4] Update main.yml --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 956684a..e33d85b 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,7 +12,7 @@ jobs: - uses: actions/setup-go@master with: go-version: '1.13' - - name: gofmt + - name: Run gofmt run: test -z $(gofmt -l .) || (gofmt -d . && exit 1) lint: @@ -24,7 +24,7 @@ jobs: - uses: actions/setup-go@master with: go-version: '1.13' - - name: golangci-lint + - name: Run golangci-lint run: | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.22.2 ./bin/golangci-lint run -v ./... @@ -38,9 +38,9 @@ jobs: - uses: actions/setup-go@master with: go-version: '1.13' - - name: go test + - name: Run go test run: go test -race -coverprofile=coverage.txt ./... - - name: upload to codecov + - name: Upload coverage to codecov.io if: github.event_name == 'push' uses: codecov/codecov-action@v1 with: