feat: DevOps Error Library β 167 errors, search tooling, CI #1
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| name: Validate errors, build index, run tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| - name: Set up environment | |
| run: | | |
| uv venv | |
| uv pip install -e ".[dev]" | |
| - name: Lint (ruff) | |
| run: uv run ruff check . | |
| - name: Validate every error document (front matter + sections + slugs) | |
| run: uv run errlib validate | |
| - name: Check for duplicate slugs and run the test suite | |
| run: uv run pytest | |
| - name: Build the search index | |
| run: uv run errlib index --out search-index.json | |
| - name: Report library stats | |
| run: uv run errlib stats | |
| - name: Upload search index artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: search-index | |
| path: search-index.json | |
| links: | |
| name: Check Markdown links | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Lychee link checker | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: >- | |
| --no-progress | |
| --max-concurrency 8 | |
| --accept 200,206,429 | |
| --exclude-mail | |
| './**/*.md' | |
| fail: false |