-
Notifications
You must be signed in to change notification settings - Fork 205
33 lines (33 loc) · 976 Bytes
/
format.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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