databasee #19
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: Lint Go Code | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
Test-and-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository or project source code to the hosted machine | |
uses: actions/checkout@v3 | |
- name: Sets up a go environment | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20.2' | |
cache: false | |
- name: Confirm the right go version was installed | |
run: go version | |
- name: Lint the source code using golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.53 | |
- name: Test | |
run: go test ./... |