-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add test, lint and release please jobs (#1)
* feat(ci): add test step * feat(ci):add lint and release please Release-As: 0.1.0
- Loading branch information
1 parent
c554dca
commit 2775c83
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: CI | ||
on: | ||
push: | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
- name: Test | ||
run: go run gotest.tools/gotestsum@latest --junitfile unit-tests.xml --format pkgname | ||
|
||
- name: Test Summary | ||
uses: test-summary/action@v2 | ||
with: | ||
paths: "unit-tests.xml" | ||
if: always() | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.22 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: v1.58 | ||
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
needs: [test, lint] | ||
if: github.ref == 'refs/heads/main' | ||
steps: | ||
- uses: google-github-actions/release-please-action@v4 | ||
with: | ||
token: ${{ secrets.REPO_TOKEN }} | ||
release-type: go |