Upgrade Python to 3.13 #494
Workflow file for this run
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: Pull request | |
| on: | |
| pull_request: | |
| branches: [master] | |
| jobs: | |
| Lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Check formatting | |
| uses: "lgeiger/black-action@master" | |
| with: | |
| args: ". -l 79 --check" | |
| check-version: | |
| name: Check version | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| repository: ${{ github.event.pull_request.head.repo.full_name }} | |
| ref: ${{ github.event.pull_request.head.ref }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.12" | |
| - name: Build changelog | |
| run: pip install yaml-changelog>=0.1.7 && make changelog | |
| - name: Preview changelog update | |
| run: ".github/get-changelog-diff.sh" | |
| - name: Check version number has been properly updated | |
| run: .github/is-version-number-acceptable.sh | |
| Test: | |
| strategy: | |
| matrix: | |
| os: [ ubuntu-latest, windows-latest ] | |
| python-version: [ "3.12", "3.13" ] | |
| fail-fast: false | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v3 | |
| - name: Enable long paths in Git (Windows Only) | |
| if: runner.os == 'Windows' | |
| run: git config --system core.longpaths true | |
| - name: Enable Win32 long paths via registry (Windows Only) | |
| if: runner.os == 'Windows' | |
| run: reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install package | |
| run: make install | |
| - name: Run tests | |
| run: make test | |
| - uses: codecov/codecov-action@v3 | |
| - name: Build package | |
| run: make build | |
| - name: Test documentation builds | |
| run: make documentation | |
| SmokeTestForMultipleVersions: | |
| name: Test Core and Country Compatibility on (${{ matrix.os }}, py${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| needs: Lint | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install -core package with dev deps | |
| # run: python -m pip install . | |
| # Installing with dev deps to see if setuptools provides distutils (removed in Python 3.12) | |
| run: python -m pip install ".[dev]" | |
| - name: Install -us package from PyPI | |
| run: python -m pip install policyengine-us | |
| - name: Run smoke tests only | |
| run: pytest -m smoke | |
| env: | |
| RUN_SMOKE_TESTS: "1" |