restrict python version #992
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: Build and test | |
| on: | |
| push: | |
| paths: | |
| - '**.yml' | |
| - '**.toml' | |
| - '**.py' | |
| - '**.json' | |
| - '**.csv' | |
| - '**.pkl' | |
| - '**.pbz2' | |
| pull_request: | |
| paths: | |
| - '**.yml' | |
| - '**.toml' | |
| - '**.py' | |
| - '**.json' | |
| - '**.csv' | |
| - '**.pkl' | |
| - '**.pbz2' | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.12", "3.13"] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install package and dependencies | |
| run: uv sync --extra dev | |
| - name: Test | |
| run: uv run python -m pytest -m "not local and not benchmark" --cov=./ --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-latest' && contains(github.repository, 'PSLmodels/OG-Core') | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./coverage.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| verbose: true |