Skip to content

Commit

Permalink
chore: improve CI script
Browse files Browse the repository at this point in the history
  • Loading branch information
jkawamoto committed Apr 15, 2023
1 parent bdc4a6a commit 923e87f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/test.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,13 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: ">=1.20"
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit hook
uses: pre-commit/action@v3.0.0
- name: Run tests
run: go test -race -coverprofile=coverage.out -covermode=atomic -v ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Run lints
run: pre-commit run --all-files
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
windows:
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,19 @@ jobs:
args: release --clean
env:
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: develop
- name: Merge the new version into develop
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git fetch --tags origin
git merge ${REF##*/}
git push
env:
REF: ${{ github.event.push.ref }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A Pixeldrain client
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
[![Go application](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/test.yaml/badge.svg)](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/test.yaml)
[![Go application](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/ci.yaml/badge.svg)](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/ci.yaml)
[![Go Reference](https://pkg.go.dev/badge/github.com/jkawamoto/go-pixeldrain.svg)](https://pkg.go.dev/github.com/jkawamoto/go-pixeldrain)
[![codecov](https://codecov.io/gh/jkawamoto/go-pixeldrain/branch/master/graph/badge.svg?token=ppX3MVIqWA)](https://codecov.io/gh/jkawamoto/go-pixeldrain)
[![Release](https://img.shields.io/badge/release-0.7.1-brightgreen.svg)](https://github.com/jkawamoto/go-pixeldrain/releases/tag/v0.7.1)
Expand Down

0 comments on commit 923e87f

Please sign in to comment.