Skip to content

Commit

Permalink
lint-and-test: Check commit style for branch commits.
Browse files Browse the repository at this point in the history
  • Loading branch information
neiljp committed Jan 16, 2024
1 parent 646a04e commit 9a543ed
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/lint-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,28 @@ jobs:
- name: Run lint-docstring
run: ./tools/lint-docstring

gitlint:
runs-on: ubuntu-latest
name: Lint - Commit text formatting
steps:
- name: 'PR commits +1'
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- name: 'Checkout PR branch and all PR commits'
uses: actions/checkout@v3
with:
persist-credentials: false
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}
- uses: actions/setup-python@v4
with:
python-version: 3.7
cache: 'pip'
cache-dependency-path: 'setup.py'
- name: FIXME Install more minimally!
run: pip install .[dev]
- name: Run gitlint
run: git show main; git show HEAD; gitlint --commits main..HEAD --debug

base_pytest:
runs-on: ubuntu-latest
name: Install & test - CPython 3.7 (ubuntu), codecov
Expand Down

0 comments on commit 9a543ed

Please sign in to comment.