refactor: standardize string formatting and pathlib imports #61
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: [push, pull_request] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ['3.9', '3.10', '3.11', '3.12'] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Run linters | |
| run: | | |
| flake8 src/pygubuai --max-line-length=120 --extend-ignore=E203,W503 | |
| black --check src/pygubuai | |
| - name: Run type checking | |
| run: | | |
| mypy src/pygubuai --ignore-missing-imports | |
| - name: Run tests with coverage | |
| run: | | |
| pytest --cov=src/pygubuai --cov-report=term-missing --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.11' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| - name: Test CLI entry points | |
| run: | | |
| python -c "from pygubuai.create import main; import sys; sys.exit(0)" | |
| python -c "from pygubuai.register import main; import sys; sys.exit(0)" | |
| python -c "from pygubuai.template import main; import sys; sys.exit(0)" | |
| python -c "from pygubuai.workflow import main; import sys; sys.exit(0)" | |
| python -c "from pygubuai.converter import main; import sys; sys.exit(0)" |