crowdsec/.github/workflows/go-tests-windows.yml
mmetc c78c833400
CI: colored test output, colored crowdsec and crowdsec-api logs, full final db dump for mysql and sqlite (#1596)
* github-ci: color unit test output and logs
* new config option: force_color_logs (useful in CI)
* bats: show sqlite/mysql dump at the end
* removed "-v" (print package names) from "go build"
* general workflow cleanup
2022-06-17 16:12:49 +02:00

50 lines
956 B
YAML

name: Go tests (windows)
on:
push:
branches: [master]
paths-ignore:
- 'README.md'
pull_request:
branches: [master]
paths-ignore:
- 'README.md'
env:
RICHGO_FORCE_COLOR: 1
jobs:
build:
name: "Build + tests"
runs-on: windows-2022
steps:
- name: "Set up Go 1.17"
uses: actions/setup-go@v3
with:
go-version: 1.17
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 ./... | sed 's/ *coverage:.*of statements in.*//' | richgo testfilter
- name: Upload unit coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: coverage.out
flags: unit-windows