ENH: replace Github ubuntu-latest runner by p16-mapie runner #4131
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: Unit tests | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| jobs: | |
| get-latest-python: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| latest-python: ${{ steps.latest.outputs.version }} | |
| steps: | |
| - uses: snok/latest-python-versions@v1 | |
| id: latest | |
| with: | |
| min-version: "3.9" | |
| build: | |
| needs: get-latest-python | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| include: | |
| # minimum supported dependencies | |
| - os: self-hosted-ubuntu | |
| python-version: "3.9" | |
| use-pinned-deps: true | |
| numpy-version: "==1.24.1" | |
| sklearn-version: "==1.4.*" | |
| scipy-version: "==1.10.*" | |
| # latest stable dependencies | |
| - os: ubuntu-latest | |
| python-version: "${{ needs.get-latest-python.outputs.latest-python }}" | |
| use-pinned-deps: false | |
| - os: windows-latest | |
| python-version: "${{ needs.get-latest-python.outputs.latest-python }}" | |
| use-pinned-deps: false | |
| - os: macos-latest | |
| python-version: "${{ needs.get-latest-python.outputs.latest-python }}" | |
| use-pinned-deps: false | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: Git clone | |
| uses: actions/[email protected] | |
| - name: Set up Python | |
| uses: actions/[email protected] | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install minimum dependency constraints | |
| if: ${{ matrix.use-pinned-deps }} | |
| run: | | |
| python -m pip install "numpy${{ matrix.numpy-version }}" "scikit-learn${{ matrix.sklearn-version }}" "scipy${{ matrix.scipy-version }}" | |
| - name: Install project with development extras | |
| run: python -m pip install -e '.[dev]' | |
| - name: Check linting | |
| run: make lint | |
| - name: Check format | |
| run: make format | |
| - name: Check static typing | |
| run: make type-check | |
| - name: Test and coverage with pytest | |
| run: make coverage |