-
Notifications
You must be signed in to change notification settings - Fork 21
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 all workflows
This patch breaks the e2e test and build workflows apart making it so that all workflows return to using 'pull_request' to avoid any security issues and other frustrations surrounding 'pull_request_target' We now have 2 workflow files, one for build and unit tests which uses 'pull_request' and one for e2e tests. The e2e tests require secret population and must be created on branch to run, they also require the 'test e2e' label to prevent uneccessary execution. Signed-off-by: Kyle Squizzato <[email protected]>
- Loading branch information
Showing
2 changed files
with
85 additions
and
79 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,50 @@ | ||
name: Build and Unit Tests | ||
on: | ||
pull_request: | ||
types: | ||
- labeled | ||
- opened | ||
- synchronize | ||
- reopened | ||
branches: | ||
- main | ||
- release-* | ||
paths-ignore: | ||
- 'config/**' | ||
- '**.md' | ||
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