name: Spinifex Build and Test on: push: branches: - main - dev paths: - "**/*.go" - go.mod - go.sum - Makefile - .github/workflows/spinifex.yml pull_request: branches: - main - dev workflow_dispatch: jobs: build_and_test: name: Spinifex Build and Test runs-on: ubuntu-24.04 steps: - name: Checkout Spinifex uses: actions/checkout@v6 with: path: spinifex fetch-depth: 2 - name: Checkout Viperblock uses: actions/checkout@v6 with: repository: mulgadc/viperblock path: viperblock - name: Checkout Predastore uses: actions/checkout@v6 with: repository: mulgadc/predastore path: predastore - name: Setup Go uses: actions/setup-go@v6 with: cache-dependency-path: "spinifex/go.sum" go-version-file: "spinifex/go.mod" - name: Setup Go Workspace run: go work init ./spinifex ./viperblock ./predastore - name: Build Spinifex run: make -C spinifex build - name: Run Tests with Coverage run: make -C spinifex test-cover - name: Check Diff Coverage run: cd spinifex && scripts/diff-coverage.sh coverage.out --base HEAD~1 race_detection: name: Spinifex Race Detection runs-on: ubuntu-24.04 steps: - name: Checkout Spinifex uses: actions/checkout@v6 with: path: spinifex - name: Checkout Viperblock uses: actions/checkout@v6 with: repository: mulgadc/viperblock path: viperblock - name: Checkout Predastore uses: actions/checkout@v6 with: repository: mulgadc/predastore path: predastore - name: Setup Go uses: actions/setup-go@v6 with: cache-dependency-path: "spinifex/go.sum" go-version-file: "spinifex/go.mod" - name: Setup Go Workspace run: go work init ./spinifex ./viperblock ./predastore - name: Run Tests with Race Detector run: make -C spinifex test-race lint_and_security: name: Spinifex Lint and Security runs-on: ubuntu-24.04 steps: - name: Checkout Spinifex uses: actions/checkout@v6 with: path: spinifex - name: Checkout Viperblock uses: actions/checkout@v6 with: repository: mulgadc/viperblock path: viperblock - name: Checkout Predastore uses: actions/checkout@v6 with: repository: mulgadc/predastore path: predastore - name: Setup Go uses: actions/setup-go@v6 with: cache-dependency-path: "spinifex/go.sum" go-version-file: "spinifex/go.mod" - name: Setup Go Workspace run: go work init ./spinifex ./viperblock ./predastore - name: Lint uses: golangci/golangci-lint-action@v7 with: version: v2.11.3 working-directory: spinifex - name: Govulncheck run: make -C spinifex govulncheck