fix: add blockquote to CLI valid_types #347
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: Tests | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main, develop] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # Allow pushing badge updates | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python | |
| run: uv python install 3.12 | |
| - name: Install dependencies | |
| run: uv sync --extra dev | |
| - name: Run linting | |
| run: uv run ruff check | |
| - name: Run tests with HTML report and coverage | |
| run: | | |
| uv run pytest --tb=short -v --html=report.html --self-contained-html --cov=src/dacli --cov-report=term-missing --cov-report=html --cov-report=json 2>&1 | tee pytest-output.txt | |
| exit ${PIPESTATUS[0]} | |
| - name: Generate badges | |
| if: success() | |
| run: | | |
| # Install coverage-badge for local badge generation | |
| uv pip install coverage-badge | |
| # Generate coverage badge locally (no external API) | |
| uv run coverage-badge -o .github/coverage-badge.svg -f | |
| # Extract test count from pytest output and generate test count badge | |
| TEST_COUNT=$(grep -oP '\d+(?= passed)' pytest-output.txt | tail -1) | |
| if [ -n "$TEST_COUNT" ]; then | |
| uv run python scripts/generate_test_badge.py "$TEST_COUNT" | |
| else | |
| echo "Warning: Could not extract test count from pytest output" | |
| fi | |
| - name: Commit badges | |
| if: success() | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git add .github/coverage-badge.svg .github/tests-badge.svg | |
| git diff --quiet && git diff --staged --quiet || (git commit -m "chore: update coverage and test count badges" && git push) | |
| continue-on-error: true | |
| - name: Upload test report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: test-report | |
| path: report.html | |
| retention-days: 30 | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: coverage-report | |
| path: htmlcov/ | |
| retention-days: 30 |