2020-07-07 00:28:28 +00:00
|
|
|
name: Lint rq
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
2022-05-16 08:25:31 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2020-07-07 00:28:28 +00:00
|
|
|
jobs:
|
|
|
|
lint:
|
|
|
|
name: Lint
|
2022-11-26 03:37:27 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2020-07-07 00:28:28 +00:00
|
|
|
|
|
|
|
steps:
|
2022-05-22 05:53:59 +00:00
|
|
|
- uses: actions/checkout@v3
|
2020-07-07 00:28:28 +00:00
|
|
|
|
|
|
|
- name: Set up Python
|
2024-04-12 23:52:15 +00:00
|
|
|
uses: actions/setup-python@v5.1.0
|
2020-07-07 00:28:28 +00:00
|
|
|
with:
|
|
|
|
python-version: 3.8
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2023-05-17 16:19:14 +00:00
|
|
|
pip install black ruff
|
2020-07-07 00:28:28 +00:00
|
|
|
|
2023-05-17 16:19:14 +00:00
|
|
|
- name: Lint with black
|
2020-07-07 00:28:28 +00:00
|
|
|
run: |
|
2023-05-17 16:19:14 +00:00
|
|
|
black --check --skip-string-normalization --line-length 120 rq tests
|
2023-02-04 00:42:51 +00:00
|
|
|
|
2023-05-17 16:19:14 +00:00
|
|
|
- name: Lint with ruff
|
2023-02-04 00:42:51 +00:00
|
|
|
run: |
|
2023-05-17 16:19:14 +00:00
|
|
|
# stop the build if there are Python syntax errors.
|
|
|
|
ruff check --show-source rq tests
|