Skip to content

[WIP] Commit conventions tests #602

[WIP] Commit conventions tests

[WIP] Commit conventions tests #602

Workflow file for this run

name: Code checkers
on: [push, pull_request]
env:
PYTHON_VERSIONS: '["3.8", "3.14"]'
jobs:
setup:
name: Setup
runs-on: ubuntu-latest
outputs:
python-versions: ${{ env.PYTHON_VERSIONS }}
python-latest: ${{ steps.set-vars.outputs.python-latest }}
steps:
- id: set-vars
run: |
LATEST=$(echo '${{ env.PYTHON_VERSIONS }}' | jq -c '.[-1:]')
echo "python-latest=$LATEST" >> $GITHUB_OUTPUT
linting:
name: Linting
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
python-version: ${{ fromJSON(needs.setup.outputs.python-versions) }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Ruff check
run: uv run ruff check
static-type-checking:
name: Static type checking
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
python-version: ${{ fromJSON(needs.setup.outputs.python-latest) }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Mypy check
run: uv run mypy
- name: Pyrefly check
run: uv run pyrefly check
semgrep:
name: Semgrep
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
python-version: ${{ fromJSON(needs.setup.outputs.python-latest) }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Semgrep scan
# Python Flask is excluded due to false positive errors in the JSON-RPC utilities.
run: |
uv run semgrep scan \
--config p/default \
--config p/security-audit \
--config semgrep.yml \
--error \
--exclude-rule python.flask.security.audit.directly-returned-format-string.directly-returned-format-string \
--exclude-rule yaml.github-actions.security.github-actions-mutable-action-tag.github-actions-mutable-action-tag
tests:
name: Tests
runs-on: ubuntu-latest
needs: setup
strategy:
matrix:
python-version: ${{ fromJSON(needs.setup.outputs.python-versions) }}
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-python-env
with:
python-version: ${{ matrix.python-version }}
- name: Pytest check
run: uv run pytest