Endpoint Check #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Endpoint Check | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 6 * * *" | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled] | |
| jobs: | |
| check-endpoints: | |
| runs-on: ubuntu-latest | |
| if: github.event_name != 'pull_request' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && contains(github.event.pull_request.labels.*.name, 'run-endpoint-check')) | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install project (editable) | |
| run: pip install -e . | |
| - name: Run endpoint checker | |
| env: | |
| CTX_API_KEY: ${{ secrets.CTX_API_KEY }} | |
| run: python scripts/check_endpoints.py --json > endpoint_status.json | |
| - name: Upload results artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: endpoint-status | |
| path: endpoint_status.json |