forked from kshedden/datareader
-
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.
- Since we don't yet have SDLC pipeline projects for Go libraries or for public projects, add in some limited CI validation for PRs to this repo including: * A build and test stage that generates binaries with the Makefile *and* runs make test-coverage to produce coverage (not currently used in CI) * Linting through the golangci-lint Github Action
- Loading branch information
1 parent
c2f8c49
commit 86e9289
Showing
2 changed files
with
63 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,30 @@ | ||
name: golangci-lint | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
permissions: | ||
contents: read | ||
# Optional: allow read access to pull request. Use with `only-new-issues` option. | ||
# pull-requests: read | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
version: latest |
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,33 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@main | ||
- name: setup | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.22' | ||
- name: Install dependencies | ||
run: make common-deps | ||
- name: run tests | ||
run: make test-coverage | ||
- name: report | ||
uses: dorny/test-reporter@v1 | ||
if: success() || failure() # run this step even if previous step failed | ||
with: | ||
name: report | ||
path: test/*.xml | ||
reporter: java-junit |