Skip to content

Add linter timeout

Add linter timeout #39

Workflow file for this run

name: Build
on:
push:
branches: ['*']
tags: ['v*']
pull_request:
branches: ['*']
jobs:
build:
name: Build
timeout-minutes: 10
strategy:
matrix:
go-version: [1.21.x, 1.22.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v4
- name: Load cached dependencies
uses: actions/cache@v4
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-${{ matrix.go-version }}-
- name: Download dependencies
run: make setup
- name: Run linter
run: make lint
- name: Run unit tests
run: make clean cover
- name: Upload coverage to coveralls.io
if: matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.22.x'
uses: coverallsapp/github-action@v2
with:
file: cover.out
flag-name: ${{ runner.os }}-go-${{ matrix.go-version }}
fail-on-error: false