@@ -16,25 +16,39 @@ jobs:
1616 strategy :
1717 fail-fast : false
1818 matrix :
19- python-version : ["3.9", "3.10", "3.11"]
19+ python-version : ["3.8", "3. 9", "3.10", "3.11", "3.12 "]
2020
2121 steps :
2222 - uses : actions/checkout@v4
23+
2324 - name : Set up Python ${{ matrix.python-version }}
2425 uses : actions/setup-python@v3
2526 with :
2627 python-version : ${{ matrix.python-version }}
28+
2729 - name : Install dependencies
2830 run : |
2931 python -m pip install --upgrade pip
3032 python -m pip install flake8 pytest
31- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
33+ cd zon-format
34+ pip install -e .
35+
3236 - name : Lint with flake8
3337 run : |
3438 # stop the build if there are Python syntax errors or undefined names
35- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
39+ flake8 zon-format/src --count --select=E9,F63,F7,F82 --show-source --statistics
3640 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
41+ flake8 zon-format/src --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
42+
3843 - name : Test with pytest
3944 run : |
40- pytest
45+ cd zon-format
46+ pytest tests/ -v
47+
48+ - name : Test import
49+ run : |
50+ python -c "import sys; sys.path.insert(0, 'zon-format/src'); import zon; print('✓ ZON imported successfully')"
51+
52+ - name : Test basic encode/decode
53+ run : |
54+ python -c "import sys; sys.path.insert(0, 'zon-format/src'); import zon; data = [{'id': 1, 'name': 'test'}]; encoded = zon.encode(data); decoded = zon.decode(encoded); assert decoded == data; print('✓ Basic encode/decode works')"
0 commit comments