chore: update CI template #1956
Workflow file for this run
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: test | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3', '3.10', '3.11', '3.12'] | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: 'pip' | |
| - name: Unit tests | |
| run: ./tests/run_unit_tests.sh | |
| - name: Integration tests | |
| run: ./tests/run_integration_tests.sh | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.x" | |
| cache: 'pip' | |
| - name: Lint | |
| run: ./tests/run_linters.sh | |
| check-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Build dev docs | |
| id: mkdocs | |
| uses: ./ | |
| with: | |
| push: false | |
| - name: Check output | |
| run: | | |
| tree | |
| - name: Cache HTMLProofer | |
| uses: actions/cache@v5 | |
| with: | |
| path: tmp/.htmlproofer | |
| key: htmlproofer | |
| - name: Test html | |
| uses: athackst/htmlproofer-action@main | |
| with: | |
| directory: "./site" | |
| retries: 3 | |
| ignore_urls: | | |
| https://twitter.com/althack | |
| https://fonts.gstatic.com | |
| https://docs.docker.com/ | |
| swap_urls: | | |
| ^.*althack.dev\/mkdocs-simple-plugin: | |
| ^\/mkdocs-simple-plugin: | |
| ^\/latest: | |
| - name: Check for diffs | |
| run: git diff --exit-code | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@main | |
| with: | |
| name: 'github-pages' | |
| path: ${{ steps.mkdocs.outputs.artifact }} | |
| retention-days: 1 | |
| complete: | |
| needs: [test, lint, check-docs] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Complete | |
| run: echo "All checks passed!" |