name: Builder - Integration tests

on:
  # on changes to the main branch touching the builder
  push:
    branches: [ main ]

  # on PRs touching the builder
  pull_request:
    branches: [ main ]

  # once a day at 6:17 AM UTC
  schedule:
    - cron: '17 6 * * *'

  # manual execution
  workflow_dispatch:

concurrency:
  group: ${{ github.workflow }}-${{ github.head_ref }}
  cancel-in-progress: true

permissions:
  contents: read

jobs:
  integration-test:
    name: Integration test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
      - name: Setup Go
        uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
        with:
          go-version: ~1.21.5
      - name: Test
        run: make builder-integration-test
