Skip to content

Commit

Permalink
First draft of the E2E workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardGomezEscandell committed Sep 13, 2023
1 parent dbdc22e commit 8846983
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/qa-azure.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: QA on Azure
# QA checks on Azure, allowing the use of a real WSL back-en

concurrency: azure-vm

on:
pull_request:
workflow_dispatch:
push:
branches: [main]

env:
az_name: wsl-ci-3
az_resource_group: wsl

jobs:
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
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Ubuntu
uses: Ubuntu/WSL/.github/actions/wsl-install@main
with:
distro: "Ubuntu"
- name: Set up Ubuntu-Preview
uses: Ubuntu/WSL/.github/actions/wsl-install@main
with:
distro: "Ubuntu-Preview"
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21.0"
- name: Test
shell: powershell
env:
UP4W_TEST_OVERRIDE_DESTRUCTIVE_CHECKS: 1
run: |
go test .\end-to-end -shuffle=on -timeout 20m
if ( ! $? ) { Exit(1) }
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 8846983

Please sign in to comment.