This repository was archived by the owner on Aug 25, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 1.53 KB
/
Copy pathpython_poetry_checks.yaml
File metadata and controls
77 lines (66 loc) · 1.53 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
on:
workflow_call:
inputs:
workdir:
type: string
required: false
default: "."
black:
type: boolean
required: false
default: false
flake8:
type: boolean
required: false
default: false
ruff:
type: boolean
required: false
default: false
pyright:
type: boolean
required: false
default: false
pytest:
type: boolean
required: false
default: false
python-version:
type: string
required: false
default: "3.10"
jobs:
checks:
name: Linter & Tests
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.workdir }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: "poetry"
- name: Poetry Install
run: poetry install
- if: inputs.black == true
name: black
run: poetry run black --check .
- if: inputs.flake8 == true
name: flake8
run: poetry run flake8
- if: inputs.ruff == true
name: ruff
run: poetry run ruff check .
- if: inputs.pyright == true
name: pyright
run: poetry run pyright
- if: inputs.pytest == true
name: pytest
run: poetry run pytest