7284c0a47a
* backoff on refresh token error * fix tls communication with lapi and user/pw auth (#1956) allow self-signed TLS encryption with user/pw auth docker: - remove defaults for certificate file locations - new envvar INSECURE_SKIP_VERIFY - register agent before TLS settings (cscli machine add removes them from the credentials file) * separate cscli cobra constructors: lapi, machines, bouncers, postoverflows (#1945) * use feature toggling to improve testability with http retry backoff * Add parse unix to dateparse enricher (#1958) Add parse unix is we do have a strTime but wasnt parsed using convential golang time * func tests: redirect stderr to filter extra logs (#1961) * backoff on refresh token error * use feature toggling to improve testability with http retry backoff * refactor feature backoff toggle for tests Co-authored-by: mmetc <92726601+mmetc@users.noreply.github.com> Co-authored-by: Laurence Jones <laurence.jones@live.co.uk>
57 lines
1.2 KiB
YAML
57 lines
1.2 KiB
YAML
name: Go tests (windows)
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- releases/**
|
|
paths-ignore:
|
|
- 'README.md'
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- releases/**
|
|
paths-ignore:
|
|
- 'README.md'
|
|
|
|
env:
|
|
RICHGO_FORCE_COLOR: 1
|
|
CROWDSEC_FEATURE_DISABLE_HTTP_RETRY_BACKOFF: true
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: "Build + tests"
|
|
runs-on: windows-2022
|
|
|
|
steps:
|
|
|
|
- name: "Set up Go 1.19"
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: 1.19
|
|
id: go
|
|
|
|
- name: Check out CrowdSec repository
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: false
|
|
|
|
- name: Build
|
|
run: |
|
|
make build
|
|
|
|
- name: Run tests
|
|
run: |
|
|
go install github.com/kyoh86/richgo@v0.3.10
|
|
go test -coverprofile coverage.out -covermode=atomic ./... > out.txt
|
|
if(!$?) { cat out.txt | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter; Exit 1 }
|
|
cat out.txt | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter
|
|
|
|
- name: Upload unit coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
files: coverage.out
|
|
flags: unit-windows
|