Skip to content

Commit 91b0ea0

Browse files
committed
FIX - update Github actions to have format action in place for generated code
1 parent ff7647e commit 91b0ea0

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.github/actions/format/action.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: 'Format Python Code'
2+
description: 'Runs ruff format and ruff check --fix'
3+
inputs:
4+
path:
5+
description: 'Path to the python repository'
6+
required: true
7+
runs:
8+
using: 'composite'
9+
steps:
10+
- name: Set up Python
11+
uses: actions/setup-python@v4
12+
with:
13+
python-version: '3.8'
14+
15+
- name: Install ruff
16+
run: pip install -e ".[dev]"
17+
shell: bash
18+
working-directory: ${{ inputs.path }}
19+
20+
- name: Run ruff format
21+
run: ruff format Adyen
22+
shell: bash
23+
working-directory: ${{ inputs.path }}
24+
25+
- name: Run ruff check --fix
26+
run: ruff check --fix Adyen
27+
shell: bash
28+
working-directory: ${{ inputs.path }}

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Install dependencies
3535
run: |
3636
python -m pip install --upgrade pip
37-
pip install ruff
37+
pip install -e ".[dev]"
3838
3939
- name: Run ruff linter
4040
run: |

0 commit comments

Comments
 (0)