Skip to content

make the node evaluation optional #7

make the node evaluation optional

make the node evaluation optional #7

Workflow file for this run

name: CI
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
on:
push:
branches:
- master
- main
- develop
pull_request:
branches:
- master
- main
- develop
permissions:
contents: read
jobs:
test:
name: Test (${{ matrix.go-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go-version:
- '1.26'
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
cache: true
- name: Setup just
uses: extractions/setup-just@v3
- name: Run unit tests
run: just test-unit
- name: Run all tests (excluding integration)
if: always()
run: just test
build:
name: Build (${{ matrix.goos }}/${{ matrix.goarch }})
runs-on: ubuntu-latest
needs: [test]
strategy:
fail-fast: false
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
- goos: windows
goarch: arm64
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Build binary
shell: bash
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
VERSION: ${{ github.sha }}
BUILD_TIME: ${{ github.event.head_commit.timestamp || github.event.repository.updated_at }}
run: |
set -euo pipefail
mkdir -p dist
BIN_NAME="abc-node-probe"
EXT=""
if [ "${GOOS}" = "windows" ]; then
EXT=".exe"
fi
OUT="dist/${BIN_NAME}-${GOOS}-${GOARCH}${EXT}"
LDFLAGS="-s -w -X main.Version=${VERSION} -X main.BuildTime=${BUILD_TIME} -X main.GitCommit=${GITHUB_SHA}"
go build -trimpath -ldflags="${LDFLAGS}" -o "${OUT}" .
- name: Upload artifact
uses: actions/upload-artifact@v5
with:
name: abc-node-probe-${{ matrix.goos }}-${{ matrix.goarch }}
path: dist/*
if-no-files-found: error