---
name: Flake Finder

on:
  schedule:
    - cron: "0 0 * * *"

jobs:
  e2e:
    name: E2E
    if: github.repository_owner == 'submariner-io'
    timeout-minutes: 45
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        deploytool: ['operator']
        globalnet: ['', 'globalnet']
        cable_driver: ['libreswan', 'wireguard']
    steps:
      - name: Check out the repository
        uses: actions/checkout@v2

      - name: Run E2E deployment and tests
        uses: submariner-io/shipyard/gh-actions/e2e@release-0.9
        with:
          using: ${{ matrix.cable_driver }} ${{ matrix.deploytool }} ${{ matrix.globalnet }}

      - name: Post mortem
        if: failure()
        uses: submariner-io/shipyard/gh-actions/post-mortem@release-0.9
