Skip to content

do not verify every when stub #47

do not verify every when stub

do not verify every when stub #47

Workflow file for this run

# Workflow file of GitHub Actions
name: build
on:
push:
branches:
- main
- feature/**
pull_request:
branches:
- main
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- name: Checkout scm
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Lint
uses: golangci/golangci-lint-action@v3
CodeQL:
needs: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout scm
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version-file: go.mod
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: go
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
Test:
needs: Lint
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
os: [ darwin, linux, windows ]
arch: [ amd64, arm64 ]
go: [ '1.20', '1.21' ]
include:
- os: darwin
runs-on: macos-latest
- os: linux
runs-on: ubuntu-22.04
- os: windows
runs-on: windows-latest
steps:
- name: Checkout scm
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: 'Test on darwin'
if: ${{ matrix.os == 'darwin' && contains(fromJson('["amd64"]'), matrix.arch) }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...
- name: 'Test on linux'
if: ${{ matrix.os == 'linux' && contains(fromJson('["amd64"]'), matrix.arch) }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...
- name: 'Test on [linux] arch [arm64] TODO'
if: ${{ matrix.os == 'linux' && contains(fromJson('["arm64"]'), matrix.arch) }}
run: go test -coverpkg=./mock/... ./...
- name: 'Test on windows'
if: ${{ matrix.os == 'windows' && contains(fromJson('["amd64"]'), matrix.arch) }}
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
run: go test -v -race -coverprofile="coverage.txt" -covermode=atomic -coverpkg=./mock/... ./...
- name: Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: Codecov on ${{ matrix.os }}/${{ matrix.arch }} go${{ matrix.go }}
fail_ci_if_error: false