feat: Phase 3.2 - Add retry logic and circuit breakers to API client … #324
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: Tests And Linting | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| env: | |
| PYTHONDONTWRITEBYTECODE: 1 | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Create virtual environment | |
| run: uv sync --all-extras --dev | |
| - name: Run ruff lint | |
| uses: astral-sh/ruff-action@v3 | |
| - name: Run ruff format check | |
| uses: astral-sh/ruff-action@v3 | |
| with: | |
| args: "format --check --diff" | |
| - name: Run ty type checker | |
| uses: JacobCoffee/[email protected] | |
| with: | |
| version: '0.0.1a26' | |
| args: 'check' | |
| - name: Run prek checks | |
| uses: j178/prek-action@v1 | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: true | |
| timeout-minutes: 15 | |
| defaults: | |
| run: | |
| shell: bash | |
| env: | |
| PYTHONDONTWRITEBYTECODE: 1 | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Create virtual environment | |
| run: uv sync --all-extras --dev | |
| - name: Test | |
| run: uv run pytest | |
| build-docs: | |
| env: | |
| DISCORD_TOKEN: ${{ secrets.DISCORD_TOKEN }} | |
| DISCORD_DEV_GUILD_ID: ${{ secrets.DISCORD_DEV_GUILD_ID }} | |
| DISCORD_DEV_USER_ID: ${{ secrets.DISCORD_DEV_USER_ID }} | |
| SECRET_KEY: ${{ secrets.SECRET_KEY }} | |
| needs: | |
| - validate | |
| if: github.event_name == 'pull_request' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version-file: ".python-version" | |
| - name: Create virtual environment | |
| run: uv sync --all-extras --dev | |
| - name: Build docs | |
| run: uv run make docs | |
| - name: Save PR number | |
| run: | | |
| echo "${{ github.event.number }}" > .pr_number | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: docs-preview | |
| path: | | |
| docs/_build/html | |
| .pr_number | |
| include-hidden-files: true |