Skip to content

Merge pull request #157 from stroppy-io/test/issue-136-integration #483

Merge pull request #157 from stroppy-io/test/issue-136-integration

Merge pull request #157 from stroppy-io/test/issue-136-integration #483

Workflow file for this run

name: CI
on:
push:
branches:
- "**"
pull_request:
workflow_call:
jobs:
golang-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Run linter
uses: golangci/golangci-lint-action@v9
with:
version: v2.12.2
args: --config .golangci.yml
- name: Run tests
run: make tests TEST_FLAGS=-short
# Integration builds stroppy once, runs the smoke tiers, and uploads the
# binary artifact. Build is gated behind it — the published binary is the one
# the integration tests actually exercised, and we never build twice.
integration:
needs: [golang-ci]
uses: ./.github/workflows/integration.yml
# Publish the integration-built binary as a per-commit nightly pre-release.
# No rebuild: it downloads the artifact integration produced. Main only.
publish:
needs: [integration]
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Compute short SHA
id: sha
run: echo "short=${GITHUB_SHA::7}" >> "$GITHUB_OUTPUT"
- name: Download binary artifact
uses: actions/download-artifact@v8
with:
name: stroppy-linux-amd64
path: build
- name: Pre-release per commit
uses: softprops/action-gh-release@v3
with:
tag_name: nightly-${{ steps.sha.outputs.short }}
name: nightly-${{ steps.sha.outputs.short }}
prerelease: true
files: build/stroppy
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}