Skip to content

Fix lint.

Fix lint. #9687

Workflow file for this run

name: build
on: [ push, pull_request, workflow_dispatch ]
jobs:
golangci:
name: lint
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wavesplatform/gowaves'
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.22
uses: actions/setup-go@v5.0.2
with:
go-version: 1.22.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-soft
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: -c .golangci.yml
# Strict linter configuration, only checking new code from pull requests.
- name: golangci-lint-strict
run: golangci-lint run -c .golangci-strict.yml --new-from-rev=origin/master --out-format=github-actions,line-number
build:
name: ubuntu
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'wavesplatform/gowaves'
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5.0.2
with:
go-version: 1.22.x
check-latest: true
cache: true
- name: Set up GolangCI-Lint
run: curl -sfL https://github.com/raw/golangci/golangci-lint/master/install.sh| sh -s -- -b $HOME/bin v1.59.0
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get dependencies
run: go mod vendor
- name: Build and test with race detector
run: export PATH="$HOME/bin:$PATH"; make ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
if: github.repository == 'wavesplatform/gowaves' # disable for forks
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt
flags: unittests
yml: ./codecov.yml
smoke:
name: smoke_tests
runs-on: self-hosted
if: github.event_name == 'pull_request' && github.repository == 'wavesplatform/gowaves'
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v5.0.2
with:
go-version: 1.22.x
check-latest: true
cache: true
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Get dependencies
run: go mod vendor
- name: Tests
run: make smoke
- name: Upload smoke tests logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: smoke_itest_logs
path: build/logs/
if-no-files-found: warn
retention-days: 5