Skip to content

integration tests for windows #124

integration tests for windows

integration tests for windows #124

Workflow file for this run

---
name: build # this string appears on badge
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
name: "Go ${{ matrix.go }} build and behavioral tests"
strategy:
matrix:
go:
- "1.18"
- "1.19"
- "1.20"
- "1.21"
- "1.22"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "${{ matrix.go }}"
- run: "go version"
- run: "go build ./cmd/..."
- run: "./behavioral-tests/run.sh"
x-build-windows:
runs-on: ubuntu-latest
timeout-minutes: 10
name: "Simple build binary for MS Windows"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- run: "go version"
- run: "go build ./cmd/..."
env:
GOOS: windows
GOARCH: amd64
- run: "file pplog.exe"
windows:
runs-on: windows-latest
timeout-minutes: 10
name: "Build on MS Windows"
steps:
- uses: actions/checkout@v4
- run: "go version" # go1.21.11 # https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md
- run: "go build ./cmd/..."
- run: "dir"
- run: "./pplog.exe -v"
- shell: bash # naked `echo` won't work on windows
run: "./pplog.exe -d bash -c 'echo \\{\\\"time\\\":\\\"2024-12-02T12:00:00Z\\\",\\\"level\\\":\\\"INFO\\\",\\\"msg\\\":\\\"Hello\\\"\\}'"
- run: |
.\behavioral-tests\windows-tests\run.ps1
shell: pwsh
test:
runs-on: ubuntu-latest
timeout-minutes: 10
name: "Unit test and lint"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.22"
- uses: golangci/golangci-lint-action@v6
with:
version: "v1.59"
- run: "go test -v -race -coverprofile=coverage.txt -covermode=atomic ./..."
env:
GOEXPERIMENT: nocoverageredesign
- uses: codecov/codecov-action@v4
with:
files: ./coverage.txt
verbose: true
token: ${{ secrets.CODECOV_TOKEN }} # required