-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
63a7048
commit a0418af
Showing
7 changed files
with
183 additions
and
10 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,73 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
e2e-labels: | ||
description: Labels to filter e2e tests | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
test: | ||
runs-on: | ||
- self-hosted-ncn-dind | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
# Install nix using cachix/install-nix-action if running on ARC runners | ||
# See: https://github.com/DeterminateSystems/nix-installer-action/issues/68 | ||
- name: Install Nix on self-hosted ARC runners | ||
uses: cachix/install-nix-action@V27 | ||
with: | ||
github_access_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install devbox | ||
uses: jetify-com/devbox-install-action@v0.11.0 | ||
with: | ||
enable-cache: "true" | ||
skip-nix-installation: "true" | ||
|
||
- uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cache/golangci-lint | ||
~/.cache/go-build | ||
~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Get Control Plane endpoint IP | ||
id: get-control-plane-endpoint-ip | ||
run: | | ||
export CONTROL_PLANE_ENDPOINT_RANGE_START="${{ vars.CONTROL_PLANE_ENDPOINT_RANGE_START }}" | ||
export CONTROL_PLANE_ENDPOINT_RANGE_END="${{ vars.CONTROL_PLANE_ENDPOINT_RANGE_END }}" | ||
control_plane_endpoint_ip="$(devbox run -- make nutanix-cp-endpoint-ip)" | ||
echo "control_plane_endpoint_ip=${control_plane_endpoint_ip}" >> "${GITHUB_OUTPUT}" | ||
- name: Check Control Plane endpoint IP | ||
run: | | ||
if [[ -z "${{ steps.get-control-plane-endpoint-ip.outputs.control_plane_endpoint_ip }}" ]]; then | ||
echo "control_plane_endpoint_ip is empty; cannot proceed with e2e tests" | ||
exit 1 | ||
fi | ||
- name: Test build | ||
run: devbox run -- make test-e2e LABEL_FILTERS='${{ inputs.e2e-labels }}' | ||
env: | ||
NUTANIX_USER: ${{ secrets.NUTANIX_USER }} | ||
NUTANIX_PASSWORD: ${{ secrets.NUTANIX_PASSWORD }} | ||
NUTANIX_ENDPOINT: ${{ vars.NUTANIX_ENDPOINT }} | ||
NUTANIX_PRISM_ELEMENT_CLUSTER_NAME: ${{ vars.NUTANIX_PRISM_ELEMENT_CLUSTER_NAME }} | ||
NUTANIX_SUBNET_NAME: ${{ vars.NUTANIX_SUBNET_NAME }} | ||
LOCAL_IMAGE_REGISTRY: ${{ vars.LOCAL_IMAGE_REGISTRY }} | ||
CONTROL_PLANE_ENDPOINT_IP: ${{ steps.get-control-plane-endpoint-ip.outputs.control_plane_endpoint_ip }} | ||
|
||
- if: success() || failure() # always run even if the previous step fails | ||
name: Publish e2e test report | ||
uses: mikepenz/action-junit-report@v4 | ||
with: | ||
report_paths: 'junit-e2e.xml' | ||
check_name: 'e2e test report' | ||
detailed_summary: true | ||
require_passed_tests: true |
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,38 @@ | ||
name: Trigger e2e tests on pull_request_target | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
pull_request_target: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
|
||
permissions: | ||
contents: read | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
e2e: | ||
strategy: | ||
matrix: | ||
e2e-labels: | ||
- "capx" | ||
fail-fast: false | ||
uses: ./.github/workflows/e2e.yml | ||
with: | ||
e2e-labels: ${{ matrix.e2e-labels }} | ||
secrets: inherit | ||
permissions: | ||
contents: read | ||
checks: write |
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
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
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
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
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 |
---|---|---|
|
@@ -13,3 +13,6 @@ releaseSeries: | |
- major: 1 | ||
minor: 6 | ||
contract: v1beta1 | ||
- major: 1 | ||
minor: 7 | ||
contract: v1beta1 |