Skip to content

Commit d325804

Browse files
committed
readded build binary action for tests
1 parent 2d664b8 commit d325804

File tree

2 files changed

+33
-3
lines changed

2 files changed

+33
-3
lines changed

.github/workflows/affected-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Affected Go Tests
22

33
on:
44
workflow_run:
5-
workflows: ["build-test"]
5+
workflows: ["build"]
66
types: [completed]
77
branches: [main]
88

@@ -11,7 +11,7 @@ permissions:
1111

1212
jobs:
1313
test-affected:
14-
# Only run if the build-test workflow succeeded and it's not a draft PR
14+
# Only run if the build workflow succeeded and it's not a draft PR
1515
if: |
1616
github.event.workflow_run.conclusion == 'success' &&
1717
github.event.workflow_run.event == 'pull_request' &&

.github/workflows/push-full-tests.yml

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,33 @@ jobs:
1818
- name: Run tests
1919
run: make test-integration
2020

21+
build-binaries:
22+
runs-on: ubuntu-latest
23+
timeout-minutes: 10
24+
steps:
25+
- uses: actions/checkout@v5
26+
- uses: ./.github/actions/setup-go
27+
- name: Cache Go build and modules
28+
uses: actions/cache@v4
29+
with:
30+
path: |
31+
~/.cache/go-build
32+
~/go/pkg/mod
33+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
34+
restore-keys: |
35+
${{ runner.os }}-go-
36+
- name: Go mod download
37+
run: go mod download
38+
- name: Build binaries
39+
run: make build
40+
- uses: actions/upload-artifact@v4
41+
with:
42+
name: binaries
43+
path: bin/
44+
retention-days: 1
45+
2146
e2e:
22-
needs: unit-integration
47+
needs: [unit-integration, build-binaries]
2348
runs-on: ubuntu-latest
2449
timeout-minutes: 15
2550
strategy:
@@ -37,6 +62,11 @@ jobs:
3762
needs-k3s: false
3863
steps:
3964
- uses: actions/checkout@v5
65+
- uses: actions/download-artifact@v4
66+
with:
67+
name: binaries
68+
path: bin/
69+
- run: chmod +x bin/*
4070
- name: Setup K3s
4171
if: matrix.needs-k3s
4272
uses: replicatedhq/action-k3s@main

0 commit comments

Comments
 (0)