Skip to content

chore: relinted, updated #2

chore: relinted, updated

chore: relinted, updated #2

Workflow file for this run

name: go test
on: [push, pull_request]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: stable
check-latest: true
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
only-new-issues: true
test:
name: Unit tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
go_version: ['oldstable', 'stable' ]
steps:
- name: Run unit tests
uses: actions/setup-go@v4
with:
go-version: '${{ matrix.go_version }}'
check-latest: true
cache: true
- uses: actions/checkout@v3
- run: go test -v -race -coverprofile="coverage-${{ matrix.os }}.${{ matrix.go_version }}.out" -covermode=atomic ./...
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
files: './coverage-${{ matrix.os }}.${{ matrix.go_version }}.out'
flags: 'unittest,${{ matrix.go_version }}'
os: '${{ matrix.os }}'
fail_ci_if_error: false
verbose: true
long-test:
name: Unit tests (long running)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
go_version: ['oldstable', 'stable' ]
steps:
- name: Run spec tests
uses: actions/setup-go@v4
with:
go-version: '${{ matrix.go_version }}'
check-latest: true
cache: true
- uses: actions/checkout@v3
- run: go test -v -enable-long -coverprofile="coverage-long-${{ matrix.os }}.${{ matrix.go_version }}.out" -covermode=atomic ./...
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
files: './coverage-long-${{ matrix.os }}.${{ matrix.go_version }}.out'
flags: 'longtest,${{ matrix.go_version }}'
os: '${{ matrix.os }}'
fail_ci_if_error: false
verbose: true
spec-test:
name: Unit tests (validates specs)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
go_version: ['oldstable', 'stable' ]
steps:
- name: Run spec tests
uses: actions/setup-go@v4
with:
go-version: '${{ matrix.go_version }}'
check-latest: true
cache: true
- uses: actions/checkout@v3
- run: go test -v -enable-go-swagger -coverprofile="coverage-swagger-${{ matrix.os }}.${{ matrix.go_version }}.out" -covermode=atomic ./...
- name: Upload coverage to codecov
uses: codecov/codecov-action@v3
with:
files: './coverage-swagger-${{ matrix.os }}.${{ matrix.go_version }}.out'
flags: 'spectest,${{ matrix.go_version }}'
os: '${{ matrix.os }}'
fail_ci_if_error: false
verbose: true