feat: cfg add #2 #4
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: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| test: | |
| name: Tests (${{ matrix.os }}, py${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Upgrade build tooling | |
| run: python -m pip install -U pip setuptools wheel | |
| - name: Set UTF-8 mode | |
| if: runner.os == 'Windows' | |
| run: echo "PYTHONUTF8=1" >> $env:GITHUB_ENV | |
| - name: Install package and test deps | |
| run: | | |
| python -m pip install -e . | |
| python -m pip install pytest | |
| - name: Smoke check CLI | |
| run: | | |
| python -c "import subprocess; subprocess.check_call(['reloadme','--help'])" | |
| - name: Run tests | |
| run: pytest -q |