readded build binary action for tests

This commit is contained in:
Noah Campbell
2025-10-13 09:52:47 -05:00
parent 2d664b8736
commit d325804359
2 changed files with 33 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ name: Affected Go Tests
on:
workflow_run:
workflows: ["build-test"]
workflows: ["build"]
types: [completed]
branches: [main]
@@ -11,7 +11,7 @@ permissions:
jobs:
test-affected:
# Only run if the build-test workflow succeeded and it's not a draft PR
# Only run if the build workflow succeeded and it's not a draft PR
if: |
github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.event == 'pull_request' &&

View File

@@ -18,8 +18,33 @@ jobs:
- name: Run tests
run: make test-integration
build-binaries:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v5
- uses: ./.github/actions/setup-go
- name: Cache Go build and modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Go mod download
run: go mod download
- name: Build binaries
run: make build
- uses: actions/upload-artifact@v4
with:
name: binaries
path: bin/
retention-days: 1
e2e:
needs: unit-integration
needs: [unit-integration, build-binaries]
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
@@ -37,6 +62,11 @@ jobs:
needs-k3s: false
steps:
- uses: actions/checkout@v5
- uses: actions/download-artifact@v4
with:
name: binaries
path: bin/
- run: chmod +x bin/*
- name: Setup K3s
if: matrix.needs-k3s
uses: replicatedhq/action-k3s@main