Skip to content

Commit

Permalink
chore: Update GitHub Actions workflow files (#167)
Browse files Browse the repository at this point in the history
* ci: simplify event trigger

* ci: Run standard output tests

* chore: Fix indent
  • Loading branch information
toshimaru committed Aug 12, 2023
1 parent 7439565 commit 1295083
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ on:
branches:
- 'main'
pull_request:
branches:
- '*'
jobs:
build:
strategy:
Expand All @@ -28,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'
Expand Down
28 changes: 16 additions & 12 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
name: Coverage with CodeClimate
on: [push, pull_request]
on:
push:
branches:
- 'main'
pull_request:
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

0 comments on commit 1295083

Please sign in to comment.