From 688069cba39e55ff9cf094097ca86c514fee19cc Mon Sep 17 00:00:00 2001 From: toshimaru Date: Sat, 12 Aug 2023 14:10:42 +0900 Subject: [PATCH 1/3] ci: simplify event trigger --- .github/workflows/ci.yml | 2 -- .github/workflows/coverage.yml | 6 +++++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8656ed0..22de453 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,6 @@ on: branches: - 'main' pull_request: - branches: - - '*' jobs: build: strategy: diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f82bd66..992c2b0 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -1,5 +1,9 @@ name: Coverage with CodeClimate -on: [push, pull_request] +on: + push: + branches: + - 'main' + pull_request: jobs: codeclimate-report: runs-on: ubuntu-latest From f446e33e9a8c17bf6087753784e8bb2f6c1bd6e7 Mon Sep 17 00:00:00 2001 From: toshimaru Date: Sat, 12 Aug 2023 14:11:01 +0900 Subject: [PATCH 2/3] ci: Run standard output tests --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22de453..9b8dae3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,9 @@ jobs: uses: goreleaser/goreleaser-action@v4 with: args: release --clean --snapshot --skip-publish - + # Output tests + - name: Normal Output Test + run: go run main.go -- main.go # ref. https://github.com/gfx/example-github-actions-with-tty - name: Colored Output Test if: runner.os == 'Linux' From e9f7f957e6dfee9a490637e921ef8eddcf32efd8 Mon Sep 17 00:00:00 2001 From: toshimaru Date: Sat, 12 Aug 2023 14:11:11 +0900 Subject: [PATCH 3/3] chore: Fix indent --- .github/workflows/coverage.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 992c2b0..d747fd5 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,14 +8,14 @@ jobs: codeclimate-report: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: '1.20 ' - - run: go build - - uses: paambaati/codeclimate-action@v5.0.0 - env: - CC_TEST_REPORTER_ID: f4c78effd3a10a5a45239e6886b35f42475467ad53f09a01002feeb04eb92d5b - with: - coverageCommand: go test ./... -coverprofile c.out - prefix: github.com/toshimaru/nyan + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: '1.20' + - run: go build + - uses: paambaati/codeclimate-action@v5.0.0 + env: + CC_TEST_REPORTER_ID: f4c78effd3a10a5a45239e6886b35f42475467ad53f09a01002feeb04eb92d5b + with: + coverageCommand: go test ./... -coverprofile c.out + prefix: github.com/toshimaru/nyan