Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/actions/format/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Format Python Code'
description: 'Runs ruff format and ruff check --fix'
inputs:
path:
description: 'Path to the python repository'
required: true
runs:
using: 'composite'
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install ruff
run: pip install -e ".[dev]"
shell: bash
working-directory: ${{ inputs.path }}

- name: Run ruff format
run: ruff format Adyen
shell: bash
working-directory: ${{ inputs.path }}

- name: Run ruff check --fix
run: ruff check --fix Adyen
shell: bash
working-directory: ${{ inputs.path }}
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
pip install -e ".[dev]"

- name: Run ruff linter
run: |
Expand Down
Loading