fix(security): hide console window only in Windows #290
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Test | |
on: [push] | |
jobs: | |
test: | |
name: Build & Test | |
strategy: | |
fail-fast: false | |
matrix: | |
go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Build | |
run: | | |
go env -w GOFLAGS=-mod=mod | |
go build -v ./... | |
- name: Extract test data | |
run: | | |
cd test | |
7z x "*.7z" -pinfected | |
- name: Test With Coverage | |
run: go test -race -coverprofile=coverage -covermode=atomic | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
with: | |
files: ./coverage | |
if: matrix.os == 'windows-latest' && matrix.go-version == '1.19.x' | |
- name: Go vet | |
run: | | |
go vet . | |
if: matrix.os == 'windows-latest' && matrix.go-version == '1.19.x' | |
- name: Staticcheck | |
uses: dominikh/[email protected] | |
with: | |
version: "2022.1" | |
install-go: false | |
cache-key: ${{ matrix.go }} | |
if: matrix.os == 'windows-latest' && matrix.go-version == '1.19.x' |