-
Notifications
You must be signed in to change notification settings - Fork 5
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 ci workflow * chore(ci): update lint action version. * chore(ci): bump actions version. * chore(ci): increase lint step timeout. * test: add test case name. * test: add executeAfter * test: add executeAfter
- Loading branch information
1 parent
7182747
commit a420d7c
Showing
2 changed files
with
80 additions
and
17 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,48 @@ | ||
name: Lint and Test | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
golangci: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.17' | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: latest | ||
args: --timeout=3m | ||
|
||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '1.17' | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod # Module download cache | ||
~/.cache/go-build # Build cache (Linux) | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- run: go get | ||
|
||
- run: go test -race -covermode atomic -coverprofile=coverage.txt -coverpkg=github.com/gbox-proxy/gbox ./... | ||
|
||
- uses: codecov/codecov-action@v3 | ||
with: | ||
path-to-profile: coverage.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