2019-08-31 10:23:47 +03:00
|
|
|
name: Lint
|
|
|
|
|
2021-11-30 23:14:34 +03:00
|
|
|
on: [push, pull_request, workflow_dispatch]
|
2019-08-31 10:23:47 +03:00
|
|
|
|
2023-06-30 18:50:18 +03:00
|
|
|
env:
|
|
|
|
FORCE_COLOR: 1
|
|
|
|
|
2022-07-04 04:19:58 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-11-09 10:42:46 +03:00
|
|
|
concurrency:
|
2022-09-26 15:16:33 +03:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2019-08-31 10:23:47 +03:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2020-07-02 13:08:42 +03:00
|
|
|
name: Lint
|
2019-09-02 11:24:20 +03:00
|
|
|
|
2019-08-31 10:23:47 +03:00
|
|
|
steps:
|
2023-09-05 00:04:29 +03:00
|
|
|
- uses: actions/checkout@v4
|
2024-11-03 00:29:56 +03:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
2019-08-31 10:23:47 +03:00
|
|
|
|
2020-02-05 18:59:04 +03:00
|
|
|
- name: pre-commit cache
|
2024-01-20 09:07:48 +03:00
|
|
|
uses: actions/cache@v4
|
2020-02-05 18:59:04 +03:00
|
|
|
with:
|
|
|
|
path: ~/.cache/pre-commit
|
|
|
|
key: lint-pre-commit-${{ hashFiles('**/.pre-commit-config.yaml') }}
|
|
|
|
restore-keys: |
|
|
|
|
lint-pre-commit-
|
|
|
|
|
2020-06-30 22:04:43 +03:00
|
|
|
- name: Set up Python
|
2023-12-07 18:07:52 +03:00
|
|
|
uses: actions/setup-python@v5
|
2019-08-31 10:23:47 +03:00
|
|
|
with:
|
2022-11-09 12:03:16 +03:00
|
|
|
python-version: "3.x"
|
2021-11-18 14:42:41 +03:00
|
|
|
cache: pip
|
|
|
|
cache-dependency-path: "setup.py"
|
2019-08-31 10:23:47 +03:00
|
|
|
|
2019-12-09 23:35:31 +03:00
|
|
|
- name: Build system information
|
2021-01-06 14:42:31 +03:00
|
|
|
run: python3 .github/workflows/system-info.py
|
2019-12-09 23:35:31 +03:00
|
|
|
|
2019-08-31 10:23:47 +03:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
2021-01-06 14:42:31 +03:00
|
|
|
python3 -m pip install -U pip
|
|
|
|
python3 -m pip install -U tox
|
2019-08-31 10:23:47 +03:00
|
|
|
|
|
|
|
- name: Lint
|
|
|
|
run: tox -e lint
|
2020-06-22 12:22:43 +03:00
|
|
|
env:
|
|
|
|
PRE_COMMIT_COLOR: always
|
2023-06-30 18:50:18 +03:00
|
|
|
|
|
|
|
- name: Mypy
|
|
|
|
run: tox -e mypy
|