Repository navigation
Update DOI badge in README.md #18
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
| # CI for patchnotes — which dogfoods patchnotes. | |
| # The changelog job uses the bundled action (uses: ./) installed from the | |
| # checked-out source (version: "."), so every PR proves the action works. | |
| name: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - run: pip install . pytest | |
| - run: pytest tests/ -q | |
| changelog: | |
| name: Validate own changelog (dogfood) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # the badge step commits to the gh-pages branch | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| # patchnotes validating patchnotes, via its own action, from source. | |
| # On pushes to main it also publishes its own README badge; on PRs | |
| # (including from forks, which have no write token) it just validates. | |
| - uses: ./ | |
| with: | |
| file: CHANGELOG.md | |
| strict: "true" | |
| check-version: pyproject.toml | |
| version: "." | |
| badge: ${{ github.event_name == 'push' && 'gh-pages' || 'none' }} | |
| sarif: | |
| name: Upload changelog SARIF to code scanning | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - run: pip install . | |
| - name: Generate SARIF | |
| run: patchnotes CHANGELOG.md --format sarif validate > results.sarif || true | |
| - uses: github/codeql-action/upload-sarif@v3 | |
| with: | |
| sarif_file: results.sarif |