-
Notifications
You must be signed in to change notification settings - Fork 12
42 lines (36 loc) · 1.19 KB
/
_linting.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
34
35
36
37
38
39
40
41
42
name: Lint
on:
workflow_call:
jobs:
lint:
name: Run Linters
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.10.10
- name: Load cached pre-commit installation
id: cached-pre-comit-install
uses: actions/cache@v3
with:
path: |
~/venv
~/.cache/pre-commit
key: precommit-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}
- name: Install dependencies
if: steps.cached-pre-comit-install.outputs.cache-hit != 'true'
run: |
python -m venv ~/venv
source ~/venv/bin/activate
pip install --upgrade pip
pip install pre-commit
shell: bash
- name: Run pre-commit set
run: |
source ~/venv/bin/activate
pre-commit run --all-files
shell: bash
# end