This repository has been archived by the owner on Jul 13, 2023. It is now read-only.
-
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.
* adds lint and test workflows * fixes linter issues * renames test workflow job * removes test workflow dependency * fixes pr comments
- Loading branch information
1 parent
b831812
commit 3f6deac
Showing
2 changed files
with
64 additions
and
10 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,45 @@ | ||
# This GitHub action runs your tests for each commit push and/or PR. Optionally | ||
# you can turn it on using a cron schedule for regular testing. | ||
# | ||
name: Lint and Test | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- "README.md" | ||
push: | ||
paths-ignore: | ||
- "README.md" | ||
|
||
jobs: | ||
lint_and_test: | ||
name: lint and test | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Set up Go | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: "1.19" | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/[email protected] | ||
|
||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
args: --timeout 3m --verbose | ||
|
||
- name: gofmt | ||
uses: Jerome1337/[email protected] | ||
with: | ||
gofmt-flags: "-l -d" | ||
|
||
- name: Get dependencies | ||
run: | | ||
go mod download | ||
- name: run unit tests | ||
timeout-minutes: 10 | ||
run: | | ||
go test -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