Skip to content

Add tox -e lint to GHA #4

Add tox -e lint to GHA

Add tox -e lint to GHA #4

Workflow file for this run

name: Autoformat code and metadata
on:
workflow_dispatch:
pull_request:
branches: [ master ]
jobs:
run-and-apply:
runs-on: ubuntu-latest
steps:
- name: Checkout main branch
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Install dependencies
run: pip install --upgrade pip setuptools wheel "tox<4.0.0"
- name: Permission workaround
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Run formatter
run: tox -e lint
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: 'Commit automated formatter changes'
add: '.'
- uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install test requirements
run: |
python3 -m pip install -r requirements.txt
- name: Run tests
run: |
make test