chore(deps): bump DavidAnson/markdownlint-cli2-action (#29) #168
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] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Install lint dependencies | |
| run: python -m pip install --upgrade pip && pip install -e . --group dev | |
| - name: Run lint | |
| run: | | |
| python -m ruff check agentinit tests cli | |
| python -m ruff format --check agentinit tests cli | |
| dependency-audit: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Install audit dependencies | |
| run: python -m pip install --upgrade pip && pip install -e . --group dev pip-audit | |
| - name: Run dependency audit | |
| run: pip-audit --progress-spinner off | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Install test dependencies | |
| run: python -m pip install --upgrade pip && pip install -e . --group dev | |
| - name: Run unit tests with coverage | |
| run: python3 -m pytest tests/ -v --cov=agentinit --cov-report=term-missing | |
| package-check: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: "3.13" | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Install packaging dependencies | |
| run: python -m pip install --upgrade pip build twine | |
| - name: Build distributions | |
| run: python -m build | |
| - name: Validate package metadata | |
| run: python -m twine check --strict dist/* | |
| smoke-test: | |
| needs: [lint, dependency-audit, unit-tests, package-check] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 35 | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: pip | |
| cache-dependency-path: pyproject.toml | |
| - name: Install build tooling | |
| run: python -m pip install --upgrade pip build | |
| - name: Build distributions | |
| run: python -m build | |
| - name: Smoke test (unix) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| pip install dist/*.whl | |
| agentinit --help | |
| PROJ="$(mktemp -d)/testproj" | |
| agentinit new "$PROJ" --yes | |
| cd "$PROJ" | |
| agentinit init | |
| agentinit minimal --help | |
| agentinit remove --dry-run | |
| agentinit status --check | |
| echo "keep" > KEEP_ME.txt | |
| agentinit remove --force | |
| test -f KEEP_ME.txt && echo "KEEP_ME.txt preserved" | |
| - name: Smoke test (windows) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| python -m venv .venv | |
| .venv\Scripts\Activate.ps1 | |
| pip install (Get-ChildItem dist\*.whl).FullName | |
| agentinit --help | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| $proj = Join-Path $env:TEMP "agentinit-test-${{ github.run_id }}" | |
| agentinit new $proj --yes | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| Set-Location $proj | |
| agentinit init | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| agentinit minimal --help | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| agentinit remove --dry-run | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| agentinit status --check | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| "keep" | Out-File KEEP_ME.txt | |
| agentinit remove --force | |
| if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } | |
| if (-not (Test-Path KEEP_ME.txt)) { throw "KEEP_ME.txt was deleted" } | |
| Write-Host "KEEP_ME.txt preserved" |