Skip to content

Fix last 2 nil context warnings in StopTest tests #7

Fix last 2 nil context warnings in StopTest tests

Fix last 2 nil context warnings in StopTest tests #7

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Download dependencies
run: go mod download
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
- name: Test with race detector
run: go test -race -coverprofile=coverage.out -covermode=atomic ./...
- name: Upload coverage
uses: codecov/codecov-action@v4
with:
files: coverage.out
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
build:
name: Build
runs-on: ubuntu-latest
needs: test
strategy:
matrix:
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
exclude:
- goos: windows
goarch: arm64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- name: Build
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: '0'
run: |
ext=""
if [ "$GOOS" = "windows" ]; then ext=".exe"; fi
go build -ldflags="-s -w -X main.version=dev" \
-o bin/omnitest-${{ matrix.goos }}-${{ matrix.goarch }}${ext} \
./cmd/omnitest
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: omnitest-${{ matrix.goos }}-${{ matrix.goarch }}
path: bin/omnitest-*
web:
name: Web Dashboard
runs-on: ubuntu-latest
defaults:
run:
working-directory: web
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: web/package-lock.json
- run: npm ci
- run: npm run build