# Taken from https://github.com/pymc-labs/pymc-marketing/tree/main/.github/workflows/slow-tests-issue.yml
# See the scripts in the `scripts/slowest_tests` directory for more information
---
name: Slow Tests Issue Body

on:
  workflow_dispatch:
  schedule:
    - cron: '0 */6 * * *'

permissions:
  issues: write

jobs:
  update-comment:
    runs-on: ubuntu-latest
    steps:
      - name: Install ZSH
        run: sudo apt-get update && sudo apt-get install -y zsh
      - name: Checkout code
        uses: actions/checkout@v5
      - name: Set up Python
        uses: actions/setup-python@v6
        with:
          python-version: "3.11"
      - name: Trigger the script
        working-directory: scripts/slowest_tests
        shell: zsh {0}
        run: source update-slowest-times-issue.sh
        env:
          GITHUB_TOKEN: ${{ github.token }}
