Skip to content

Fix golangci-lint errcheck violations #2

Fix golangci-lint errcheck violations

Fix golangci-lint errcheck violations #2

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
services:
scylla:
image: scylladb/scylla:latest
ports:
- 9042:9042
options: >-
--health-cmd "cqlsh -e 'SELECT now() FROM system.local'"
--health-interval 10s
--health-timeout 5s
--health-retries 10
--health-start-period 30s
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Cache Go modules
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Install dependencies
run: go mod download
- name: Run linter
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: Run unit tests
run: go test ./... -v -count=1 -coverprofile=coverage.txt -covermode=atomic
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: ./coverage.txt
continue-on-error: true
build:
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.21"
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: "0"
run: go build -ldflags "-s -w" -o scylla-migrate-${{ matrix.goos }}-${{ matrix.goarch }} .
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: scylla-migrate-${{ matrix.goos }}-${{ matrix.goarch }}
path: scylla-migrate-*