Merge pull request #58 from jedipunkz/dependabot/go_modules/github.co… #80
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: Go-CI | |
on: [push] | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set Up | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ^1.19 | |
id: go | |
- name: Check Out | |
uses: actions/[email protected] | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
path: ~/go/pkg/mod | |
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-go- | |
build: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out | |
uses: actions/[email protected] | |
- name: Build | |
run: go build ./... | |
test: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out | |
uses: actions/[email protected] | |
- name: Test | |
run: go test ./... -v | |
lint: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out | |
uses: actions/[email protected] | |
- name: Golangci-Lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: latest |