Skip to content

Update CI checks

Update CI checks #29

Workflow file for this run

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
name: CI
jobs:
test:
strategy:
matrix:
go-version: [ 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: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: test
run: go test -v -race -timeout 10s ./...
- name: integration_test
run: go test -v ./... --tags=integration
lint:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.23.x
- name: Checkout code
uses: actions/checkout@v2
- name: Linting
uses: golangci/golangci-lint-action@v3
with:
version: v1.61
coverage:
runs-on: ubuntu-latest
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v2
with:
go-version: 1.23.x
- name: Checkout code
uses: actions/checkout@v2
- name: Calc coverage
run: go test -v -covermode=count -coverprofile=coverage.out -timeout 10s ./...
- name: Convert coverage.out to coverage.lcov
uses: jandelgado/gcov2lcov-action@v1.0.6
- name: Coveralls
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}