feat: add CPE summary #792
Workflow file for this run
This file contains 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: Linting | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
linting: | |
name: Linting | |
runs-on: ubuntu-22.04 | |
permissions: | |
contents: write # for stefanzweifel/git-auto-commit-action to create a PR | |
strategy: | |
fail-fast: false | |
matrix: | |
tool: ['isort', 'black', 'pyupgrade', 'flake8', 'bandit', 'gitlint', 'mypy'] | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 | |
with: | |
python-version: '3.x' | |
cache: 'pip' | |
- name: Install pre-commit | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools | |
python -m pip install --upgrade pre-commit | |
pre-commit install | |
- name: Run ${{ matrix.tool }} using pre-commit | |
if: ${{ matrix.tool != 'gitlint' }} | |
run: | | |
pre-commit run ${{ matrix.tool }} --all-files | |
- name: Run gitlint | |
env: | |
TITLE: ${{ github.event.pull_request.title }} | |
if: ${{ github.event_name == 'pull_request' && matrix.tool == 'gitlint' }} | |
run: | | |
python -m pip install --upgrade gitlint | |
echo "$TITLE" | gitlint | |
- uses: stefanzweifel/git-auto-commit-action@3ea6ae190baf489ba007f7c92608f33ce20ef04a | |