Skip to content

fix: ensure collection timestamps are in UTC for immediate and period… #7

fix: ensure collection timestamps are in UTC for immediate and period…

fix: ensure collection timestamps are in UTC for immediate and period… #7

Workflow file for this run

name: Build
on:
push:
branches:
- main
- develop
- 'feature/**'
pull_request:
branches:
- main
- develop
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
cache: true
- name: Install dependencies
run: go mod download
- name: Verify dependencies
run: go mod verify
- name: Run go vet
run: go vet ./...
- name: Run tests
run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.txt
fail_ci_if_error: false
- name: Build for Linux amd64
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w -X github.com/node-pulse/agent/cmd.Version=dev-${{ github.sha }}" -o dist/nodepulse-linux-amd64 .
- name: Build for Linux arm64
run: |
CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags="-s -w -X github.com/node-pulse/agent/cmd.Version=dev-${{ github.sha }}" -o dist/nodepulse-linux-arm64 .
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: nodepulse-binaries
path: dist/*
retention-days: 7