Fix pytest command in CI workflow (#224) #235
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: Integration testing with CVXPY | |
| on: | |
| pull_request: | |
| types: [reopened, opened, synchronize] | |
| push: | |
| workflow_dispatch: | |
| concurrency: | |
| # Cancel previous runs of this workflow for the same branch | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest] # Add ubuntu-latest when cvxpy pytest issue is solved | |
| numpy: [numpy] # We used to also test version 1.26.0, but now cvxpy requires numpy 2 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install CBC | |
| run: | | |
| brew install coin-or-tools/coinor/cbc | |
| echo "PKG_CONFIG_PATH=$(brew --prefix)/opt/cbc/lib/pkgconfig:$(brew --prefix)/opt/clp/lib/pkgconfig:$(brew --prefix)/opt/cgl/lib/pkgconfig:$(brew --prefix)/opt/osi/lib/pkgconfig:$(brew --prefix)/opt/coinutils/lib/pkgconfig:$PKG_CONFIG_PATH" >> $GITHUB_ENV | |
| - name: Job context | |
| run: | | |
| echo "::group::macos context" | |
| system_profiler SPSoftwareDataType | |
| echo "::endgroup::" | |
| python -V | |
| echo "::group::brew cbc info" | |
| brew info coin-or-tools/coinor/cbc | |
| echo "::endgroup::" | |
| - uses: actions/checkout@v2 | |
| with: | |
| path: cylp | |
| - name: Install CyLP | |
| run: | | |
| python3 -m pip install --break-system-packages ./cylp | |
| - name: Check out CVXPY | |
| uses: actions/checkout@v2 | |
| with: | |
| repository: cvxpy/cvxpy | |
| path: cvxpy | |
| - name: Install CVXPY | |
| run: | | |
| python3 -m pip install --break-system-packages ./cvxpy | |
| - name: Test CVXPY | |
| run: | | |
| python3 -m pip install --break-system-packages pytest hypothesis ${{ matrix.numpy }} | |
| python -m pytest --pyargs cvxpy.tests |