updating to v2.2.3 #146
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: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| build: | |
| name: build (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "**/pyproject.toml" | |
| - name: Set up Python | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install Project | |
| # Assumes pyproject.toml is in the root. | |
| # This will create the venv and install dependencies. | |
| run: uv sync --all-extras --dev | |
| - name: Lint with flake8 | |
| # Targeted ISLP directory specifically to avoid recursion errors in .venv | |
| run: | | |
| uv run flake8 ISLP --count --select=E9,F63,F7,F82 --show-source --statistics | |
| uv run flake8 ISLP --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| - name: Test with pytest | |
| timeout-minutes: 12 | |
| shell: bash | |
| run: | | |
| if [ "${{ matrix.os }}" = "macos-latest" ]; then | |
| uv run pytest --ignore tests/deeplearning/test_hitters.py --ignore tests/deeplearning/test_mnist.py | |
| else | |
| uv run pytest | |
| fi | |