Skip to content

Commit 163814f

Browse files
committed
fix: Workflow, add a check-format step
1 parent 2d793cf commit 163814f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,29 @@ jobs:
3636
id: read-version
3737
run: echo "version=$(cat c2pa-native-version.txt | tr -d '\r\n')" >> $GITHUB_OUTPUT
3838

39+
check-format:
40+
name: Check code format and syntax
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: Checkout repository
44+
uses: actions/checkout@v4
45+
46+
- name: Set up Python
47+
uses: actions/setup-python@v5
48+
with:
49+
python-version: "3.10"
50+
51+
- name: Install development dependencies
52+
run: python -m pip install -r requirements-dev.txt
53+
54+
- name: Check Python syntax
55+
run: python3 -m py_compile src/c2pa/c2pa.py
56+
continue-on-error: true
57+
58+
- name: Check code style with flake8
59+
run: flake8 src/c2pa/c2pa.py
60+
continue-on-error: true
61+
3962
tests-unix:
4063
name: Unit tests for developer setup (Unix)
4164
needs: read-version

0 commit comments

Comments
 (0)