-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break e2e tests into own workflow, use pull_request for build workflow
This patch breaks the e2e test and build workflows apart making it so that the build workflow no longer relies on 'pull_request_target' to function. We now have 2 workflow files, one for build and unit tests which uses 'pull_request' and one for e2e tests that uses 'pull_request_target'. Signed-off-by: Kyle Squizzato <[email protected]>
- Loading branch information
Showing
2 changed files
with
93 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Build and Unit Tests | ||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
- opened | ||
- synchronize | ||
- reopened | ||
branches: | ||
- main | ||
- release-* | ||
paths-ignore: | ||
- 'config/**' | ||
- '**.md' | ||
- '.github/**' | ||
push: | ||
tags: | ||
- '*' | ||
|
||
env: | ||
GO_VERSION: '1.22' | ||
|
||
jobs: | ||
build: | ||
concurrency: | ||
group: ${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
name: Build and Unit Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
cache: false | ||
- name: Lint | ||
uses: golangci/golangci-lint-action@v6 | ||
with: | ||
args: --timeout 10m0s | ||
- name: Verify all generated pieces are up-to-date | ||
run: make generate-all && git add -N . && git diff --exit-code | ||
- name: Unit tests | ||
run: | | ||
make test | ||
- name: Build HMC controller image | ||
run: | | ||
make docker-build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters