| 1 |
name: Lint |
| 2 |
on: |
| 3 |
push: |
| 4 |
branches: [master] |
| 5 |
pull_request: |
| 6 |
schedule: |
| 7 |
- cron: '0 6 * * 1' |
| 8 |
concurrency: |
| 9 |
group: ${{ github.workflow }}-${{ github.ref }} |
| 10 |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} |
| 11 |
jobs: |
| 12 |
ruff: |
| 13 |
runs-on: ubuntu-latest |
| 14 |
if: github.event_name != 'schedule' || github.repository == 'libmbd/libmbd' |
| 15 |
steps: |
| 16 |
- uses: actions/checkout@v6 |
| 17 |
- uses: actions/setup-python@v6 |
| 18 |
with: |
| 19 |
python-version: "3.14" |
| 20 |
- name: Install dependencies |
| 21 |
run: pip install ruff |
| 22 |
- run: ruff check |
| 23 |
- run: ruff format --check |
| 24 |
fprettify: |
| 25 |
runs-on: ubuntu-latest |
| 26 |
if: github.event_name != 'schedule' || github.repository == 'libmbd/libmbd' |
| 27 |
steps: |
| 28 |
- uses: actions/checkout@v6 |
| 29 |
- uses: actions/setup-python@v6 |
| 30 |
with: |
| 31 |
python-version: "3.14" |
| 32 |
- name: Install dependencies |
| 33 |
run: pip install fprettify |
| 34 |
- name: Run fprettify |
| 35 |
run: | |
| 36 |
fprettify -d -r . | tee diff |
| 37 |
test -z "$(cat diff)" |