-
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.
- Loading branch information
Showing
5 changed files
with
110 additions
and
2 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,19 @@ | ||
### What is this about? | ||
|
||
Description or closes #<issue> | ||
|
||
### Breaking change No | ||
|
||
Yes/No? | ||
|
||
### How can it be verified? | ||
|
||
Test case or unit tests? | ||
|
||
### ToDo | ||
|
||
- [ ] Unit tests | ||
- [ ] Edit README, if needed | ||
- [ ] Format source code by running `make fmt` | ||
- [ ] Pass the test by `go test -v` | ||
- [ ] Enable "Allow edits from maintainers" for this PR |
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 Build | ||
|
||
on: | ||
push: | ||
paths: | ||
- "**.go" | ||
- "go.mod" | ||
- "go.sum" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: [ '1.18', '1.22' ] | ||
steps: | ||
- name: Set up Go v${{ matrix.go }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install deps | ||
run: | | ||
go version | ||
go get -v -d ./... | ||
- name: Cache modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: $GOPATH/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go | ||
|
||
- name: Vet code | ||
run: go vet | ||
- name: Build | ||
run: go build -v . | ||
- name: Test with Go | ||
run: go test -v > TestResults-${{ matrix.go-version }}.txt | ||
- name: Upload Go test results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Test-results-${{ matrix.go-version }} | ||
path: TestResults-${{ matrix.go-version }}.txt |
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,36 @@ | ||
name: CI Check PR | ||
|
||
on: [ pull_request_target ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: [ '1.18', '1.22' ] | ||
steps: | ||
- name: Set up Go v${{ matrix.go }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install deps | ||
run: | | ||
go version | ||
go get -v -d ./... | ||
- name: Cache modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: $GOPATH/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: ${{ runner.os }}-go | ||
|
||
- name: Vet code | ||
run: go vet | ||
|
||
- name: Sample Build | ||
run: go build -v . |
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
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