Skip to content

Commit

Permalink
add option to run E2E test without nix env & use it for the `aks-runt…
Browse files Browse the repository at this point in the history
…ime` test
  • Loading branch information
miampf committed Oct 24, 2024
1 parent 807b8b3 commit 3861654
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 17 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ on:
self-hosted:
description: "Self Hosted"
type: boolean
run-without-nix:
description: "Run the E2E test without using a nix shell"
type: boolean
required: false
default: false

env:
container_registry: ghcr.io/edgelesssys
Expand Down Expand Up @@ -73,11 +78,22 @@ jobs:
- name: E2E Test
run: |
nix run .#scripts.get-logs workspace/e2e.namespace &
nix shell -L .#contrast.e2e --command ${{ inputs.test-name }}.test -test.v \
--image-replacements workspace/just.containerlookup \
--namespace-file workspace/e2e.namespace \
--platform ${{ inputs.platform }} \
--skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}"
if [[ "${{inputs.run-without-nix}}" == "false" ]]; then
echo "Running with nix"
nix shell -L .#contrast.e2e --command ${{ inputs.test-name }}.test -test.v \
--image-replacements workspace/just.containerlookup \
--namespace-file workspace/e2e.namespace \
--platform ${{ inputs.platform }} \
--skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}"
else
echo "Running without nix"
nix build .#contrast.e2e
./result/bin/${{ inputs.test-name }}.test -test.v \
--image-replacements workspace/just.containerlookup \
--namespace-file workspace/e2e.namespace \
--platform ${{ inputs.platform }} \
--skip-undeploy="${{ inputs.skip-undeploy && 'true' || 'false' }}"
fi
- name: Upload logs
if: always()
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
Expand Down
46 changes: 34 additions & 12 deletions .github/workflows/e2e_aks_runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,37 @@ on:

jobs:
test_matrix:
name: Test aks runtime
uses: ./.github/workflows/e2e.yml
with:
skip-undeploy: false
test-name: aks-runtime
platform: AKS-CLH-SNP
runner: ubuntu-22.04
self-hosted: false
secrets: inherit
permissions:
contents: read
packages: write
steps:
- name: Install `az` with extensions
run: |
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -sLS https://packages.microsoft.com/keys/microsoft.asc |
gpg --dearmor | sudo tee /etc/apt/keyrings/microsoft.gpg > /dev/null
sudo chmod go+r /etc/apt/keyrings/microsoft.gpg
AZ_DIST=$(lsb_release -cs)
echo "Types: deb
URIs: https://packages.microsoft.com/repos/azure-cli/
Suites: ${AZ_DIST}
Components: main
Architectures: $(dpkg --print-architecture)
Signed-by: /etc/apt/keyrings/microsoft.gpg" | sudo tee /etc/apt/sources.list.d/azure-cli.sources
sudo apt-get update
sudo apt-get install azure-cli
az extension add --name aks-preview
az extension add --name confcom
- name: Test aks runtime
uses: ./.github/workflows/e2e.yml
with:
skip-undeploy: false
test-name: aks-runtime
platform: AKS-CLH-SNP
runner: ubuntu-22.04
self-hosted: false
run-without-nix: true
secrets: inherit
permissions:
contents: read
packages: write

0 comments on commit 3861654

Please sign in to comment.