Skip to content

build: golangci-lint fix #35

build: golangci-lint fix

build: golangci-lint fix #35

Workflow file for this run

---
on: [push, pull_request]
name: 'Test'
jobs:
setup:
strategy:
matrix:
go-version: [1.20.x, 1.21.x, 1.22.x, 1.23.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: 'Install Go'
uses: 'actions/setup-go@v2'
with:
go-version: '1.20.x'
- name: 'Checkout code'
uses: 'actions/checkout@v2'
- uses: 'actions/cache@v2'
with:
# In order:
# * Module download cache
# * Build cache (Linux)
# * Build cache (Mac)
# * Build cache (Windows)
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
%LocalAppData%\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
test:
needs: ['setup']
strategy:
matrix:
go-version: [1.20.x, 1.21.x, 1.22.x, 1.23.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: 'Test'
run: 'make test'
- name: 'Publish to code climate'
uses: 'paambaati/[email protected]'
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{github.workspace}}/.coverage/coverage.out:gocov
prefix: 'github.com/jufemaiz/go-aemo'
- name: 'Publish to codecov'
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
files: ${{github.workspace}}/.coverage/coverage.out
verbose: true # optional (default = false)