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
|
|
|
|
2022-07-04 04:19:58 +03:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
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:
|
2022-03-04 12:04:12 +03:00
|
|
|
- uses: actions/checkout@v3
|
2019-08-31 10:23:47 +03:00
|
|
|
|
2020-02-05 18:59:04 +03:00
|
|
|
- name: pre-commit cache
|
2022-09-24 12:50:14 +03:00
|
|
|
uses: actions/cache@v3
|
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
|
2022-09-24 12:50:14 +03:00
|
|
|
uses: actions/setup-python@v4
|
2019-08-31 10:23:47 +03:00
|
|
|
with:
|
2021-11-18 14:42:41 +03:00
|
|
|
python-version: "3.10"
|
|
|
|
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
|