Created
January 26, 2022 14:36
-
-
Save kai5263499/496a9a11070921c9bb0161aed70fef6f to your computer and use it in GitHub Desktop.
go test and lint github action
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
name: build lint and test | |
on: push | |
jobs: | |
lint: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: setup go | |
uses: actions/setup-go@v2 | |
- name: configure private github access | |
run: | | |
git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/PrivateRepo".insteadOf "https://github.com/PrivateRepo" | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v2 | |
test: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: setup go | |
uses: actions/setup-go@v2 | |
- name: configure private github access | |
run: | | |
git config --global url."https://${{ secrets.GO_MODULES_TOKEN }}:x-oauth-basic@github.com/PrivateRepo".insteadOf "https://github.com/PrivateRepo" | |
- name: test | |
run: | | |
go test -v -cover ./... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment