name: Cloud Hypervisor Tests (ARM64)
on: [pull_request, merge_group]
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build:
    timeout-minutes: 60
    name: Tests (ARM64)
    runs-on: focal-arm64
    steps:
      - name: Fix workspace permissions
        run: sudo chown -R github-runner:github-runner ${GITHUB_WORKSPACE}
      - name: Code checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Run unit tests (musl)
        run: scripts/dev_cli.sh tests --unit --libc musl
      - name: Load openvswitch module
        run: sudo modprobe openvswitch
      - name: Run integration tests (musl)
        timeout-minutes: 30
        run: scripts/dev_cli.sh tests --integration --libc musl