Skip to content

extracts process management into separate interface #207

extracts process management into separate interface

extracts process management into separate interface #207

Workflow file for this run

# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Lint | Test | Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
lint:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.5'
-
name: Install lint deps
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.53.3
-
name: Run Lint
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
golangci-lint run --timeout 5m
test:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.5'
-
name: Symlink go
run: sudo ln -f -s /opt/hostedtoolcache/go/1.21.5/x64/bin/* /usr/bin/
-
name: Install ginkgo
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go install github.com/onsi/ginkgo/v2/ginkgo@latest
-
name: Build agent
working-directory: ./agent/cmd/nex-agent
run: go build -tags netgo -ldflags '-extldflags "-static"'
-
name: Run spec suite
working-directory: .
run: sudo -E go run github.com/onsi/ginkgo/v2/ginkgo -r --randomize-all --randomize-suites --vv --trace --keep-going --output-interceptor-mode=none ./spec
-
name: Run test suite
working-directory: .
run: go test -v -race ./test
build:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21.5'
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: build --clean --snapshot