Skip to content

Set full go version with 'go' directive in 'go.mod' (#305) #1784

Set full go version with 'go' directive in 'go.mod' (#305)

Set full go version with 'go' directive in 'go.mod' (#305) #1784

Workflow file for this run

name: build
on: [ push, pull_request ]
jobs:
golangci:
name: lint
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wavesplatform/nodemon'
strategy:
matrix:
os: [ macos-latest, windows-latest, ubuntu-latest ]
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go 1.23
uses: actions/setup-go@v5.1.0
with:
go-version: 1.23.x
check-latest: true
cache: false # don't save & restore build caches because golangci-lint action does it internally
- name: Get dependencies
run: go mod vendor
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: -c .golangci.yml
build:
name: ubuntu
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wavesplatform/nodemon'
steps:
- uses: actions/checkout@v4
- name: Set up Go 1.23
uses: actions/setup-go@v5.1.0
with:
go-version: 1.23.x
check-latest: true
cache: true
- name: Set up GolangCI-Lint
run: curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $HOME/bin v1.61.0
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get dependencies
run: make vendor
- name: Build
run: export PATH="$HOME/bin:$PATH"; make all
- name: Test with race detector
run: go test -race -coverprofile=coverage.txt -covermode=atomic ./...