-
Notifications
You must be signed in to change notification settings - Fork 11
36 lines (30 loc) · 824 Bytes
/
format.yml
File metadata and controls
36 lines (30 loc) · 824 Bytes
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
name: autopep8 formatting
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
jobs:
check-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip'
- name: Install Dependencies
run:
pip install autopep8
- name: autopep8
run: |
autopep8 --in-place --aggressive --recursive ompackagemanager
if ! git diff --exit-code; then
echo "❌ Code not formatted. Please run 'autopep8 --in-place --aggressive --recursive ompackagemanager' locally."
exit 1
else
echo "✅ Code is properly formatted."
fi