xref: /cloud-hypervisor/.github/workflows/integration-rate-limiter.yaml (revision eeae63b4595fbf0cc69f62b6e9d9a79c543c4ac7)
1name: Cloud Hypervisor Tests (Rate-Limiter)
2on: [merge_group, pull_request]
3concurrency:
4  group: ${{ github.workflow }}-${{ github.ref }}
5  cancel-in-progress: true
6
7jobs:
8  build:
9    name: Tests (Rate-Limiter)
10    runs-on: ${{ github.event_name == 'pull_request' && 'ubuntu-latest' || 'garm-jammy-16' }}
11    env:
12      AUTH_DOWNLOAD_TOKEN: ${{ secrets.AUTH_DOWNLOAD_TOKEN }}
13    steps:
14      - name: Code checkout
15        if: ${{ github.event_name != 'pull_request' }}
16        uses: actions/checkout@v4
17        with:
18          fetch-depth: 0
19      - name: Install Docker
20        if: ${{ github.event_name != 'pull_request' }}
21        run: |
22          sudo apt-get update
23          sudo apt-get -y install ca-certificates curl gnupg
24          curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
25          sudo chmod a+r /usr/share/keyrings/docker-archive-keyring.gpg
26          echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
27          sudo apt-get update
28          sudo apt install -y docker-ce docker-ce-cli
29      - name: Run rate-limiter integration tests
30        if: ${{ github.event_name != 'pull_request' }}
31        timeout-minutes: 20
32        run: scripts/dev_cli.sh tests --integration-rate-limiter
33      - name: Skipping build for PR
34        if: ${{ github.event_name == 'pull_request' }}
35        run: echo "Skipping build for PR"
36