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

jobs:
  integration-test:
    name: Integration test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout Repo
        uses: actions/checkout@v4
      - name: Setup Go
        uses: actions/setup-go@v4
        with:
          go-version: ~1.20.8
      - name: Test
        run: make builder-integration-test
