This repository has been archived by the owner on Dec 17, 2024. It is now read-only.
message weight #225
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
on: | |
push: | |
branches: | |
- master | |
- dev | |
pull_request: | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [1.18] | |
steps: | |
- name: Set up Go | |
uses: actions/[email protected] | |
with: | |
go-version: ${{ matrix.go }} | |
id: go | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: "14" | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- id: go-cache-paths | |
run: | | |
echo "::set-output name=go-build::$(go env GOCACHE)" | |
echo "::set-output name=go-mod::$(go env GOMODCACHE)" | |
# Cache go build cache, used to speedup go test | |
- name: Go Build Cache | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-build }} | |
key: ${{ runner.os }}-go-build-${{ hashFiles('**/go.sum') }} | |
# Cache go mod cache, used to speedup builds | |
- name: Go Mod Cache | |
uses: actions/[email protected] | |
with: | |
path: ${{ steps.go-cache-paths.outputs.go-mod }} | |
key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} | |
- name: install deps | |
run: make deps | |
- uses: actionsx/prettier@v2 | |
with: | |
args: --check . | |
- name: golangci-lint | |
uses: golangci/[email protected] | |
- name: lint | |
run: make lint |