Skip to content

Commit

Permalink
Use racked machines as runners for the E2E tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardGomezEscandell committed Nov 20, 2023
1 parent 87dacae commit 737b486
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions .github/workflows/qa-azure.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
name: Build and run end-to-end tests
# Builds the project, and runs end-to-end tests using the generated artifacts.

concurrency: azure-vm
concurrency:
group: Build+E2E-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

on:
pull_request:
Expand Down Expand Up @@ -40,7 +42,7 @@ jobs:
matrix:
mode: ["production", "end_to_end_tests"]
name: Build Windows Agent Appx
runs-on: windows-latest
runs-on: [self-hosted, Windows, racked]
steps:
- name: Set up git
uses: canonical/ubuntu-pro-for-windows/.github/actions/setup-git@main
Expand Down Expand Up @@ -98,23 +100,10 @@ jobs:
msix/UbuntuProForWindows/AppPackages/UbuntuProForWindows_*/UbuntuProForWindows_*.cer
msix/UbuntuProForWindows/AppPackages/UbuntuProForWindows_*/UbuntuProForWindows_*.msixbundle
vm-setup:
name: Set up Azure VM
runs-on: ubuntu-latest
steps:
- name: Azure login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_VM_CREDS }}
- name: Start the Runner
shell: bash
run: |
az vm start --name ${{ env.az_name }} --resource-group ${{ env.az_resource_group }}
qa:
name: Run end-to-end tests on the Azure VM
runs-on: [self-hosted, Windows]
needs: [vm-setup, build-wsl-pro-service, build-ubuntu-pro-for-windows]
runs-on: [self-hosted, Windows, racked]
needs: [build-wsl-pro-service, build-ubuntu-pro-for-windows]
steps:
- name: Set up git
uses: canonical/ubuntu-pro-for-windows/.github/actions/setup-git@main
Expand Down Expand Up @@ -196,18 +185,3 @@ jobs:
# Uninstall certificate
$thumbprint = (Get-PfxCertificate -FilePath "ci-artifacts\windows-agent\UbuntuProForWindows_*.cer").Thumbprint
Remove-Item -Path "Cert:LocalMachine\TrustedPeople\${thumbprint}"
stop-vm:
name: Clean up the Azure VM
runs-on: ubuntu-latest
needs: [vm-setup, qa]
if: always()
steps:
- name: Azure login
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_VM_CREDS }}
- name: Deallocate the Runner
shell: bash
run: |
az vm deallocate --name ${{ env.az_name }} --resource-group ${{ env.az_resource_group }}

0 comments on commit 737b486

Please sign in to comment.