Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call pytest on all tests #286

Merged
merged 3 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 8 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -431,10 +431,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install pytest

- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -468,11 +464,11 @@ jobs:
${{ env.minizinc_config_cmdline }}
minizinc --version

- name: Install scikit-decide
- name: Install scikit-decide and test dependencies
run: |
python_version=${{ matrix.python-version }}
wheelfile=$(ls ./wheels/scikit_decide*-cp${python_version/\./}-*win*.whl)
pip install ${wheelfile}[all]
pip install ${wheelfile}[all] pytest gymnasium[classic-control]

- name: Test with pytest
run: |
Expand All @@ -481,10 +477,7 @@ jobs:
# test minizinc
python -c "import minizinc; print(minizinc.default_driver.minizinc_version); minizinc.Solver.lookup('gecode')"
# run pytest
pytest -v -s tests/autocast
pytest -v -s tests/solvers/cpp
pytest -v -s tests/solvers/python
pytest -v -s tests/scheduling
pytest -v -s tests

test-macos:
needs: [build-macos, setup]
Expand Down Expand Up @@ -512,10 +505,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install pytest

- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -551,11 +540,11 @@ jobs:
${{ env.minizinc_config_cmdline }}
minizinc --version

- name: Install scikit-decide
- name: Install scikit-decide and test dependencies
run: |
python_version=${{ matrix.python-version }}
wheelfile=$(ls ./wheels/scikit_decide*-cp${python_version/\./}-*macos*.whl)
pip install ${wheelfile}[all]
pip install ${wheelfile}[all] pytest gymnasium[classic-control]

- name: Test with pytest
run: |
Expand All @@ -564,10 +553,7 @@ jobs:
# test minizinc
python -c "import minizinc; print(minizinc.default_driver.minizinc_version); minizinc.Solver.lookup('gecode')"
# run pytest
pytest -v -s tests/autocast
pytest -v -s tests/solvers/cpp
pytest -v -s tests/solvers/python
pytest -v -s tests/scheduling
pytest -v -s tests

test-ubuntu:
needs: [build-ubuntu, setup]
Expand All @@ -593,10 +579,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install pytest docopt commonmark

- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -637,7 +619,7 @@ jobs:
run: |
python_version=${{ matrix.python-version }}
wheelfile=$(ls ./wheels/scikit_decide*-cp${python_version/\./}-*manylinux*.whl)
pip install ${wheelfile}[all]
pip install ${wheelfile}[all] pytest gymnasium[classic-control] docopt commonmark

- name: Test with pytest
run: |
Expand All @@ -646,10 +628,7 @@ jobs:
# test minizinc
python -c "import minizinc; print(minizinc.default_driver.minizinc_version); minizinc.Solver.lookup('gecode')"
# run pytest
pytest -v -s tests/autocast
pytest -v -s tests/solvers/cpp
pytest -v -s tests/solvers/python
pytest -v -s tests/scheduling
pytest -v -s tests

- name: Test python block codes from guide
run: |
Expand Down
39 changes: 9 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install pytest

- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -378,11 +374,11 @@ jobs:
${{ env.minizinc_config_cmdline }}
minizinc --version

- name: Install scikit-decide
- name: Install scikit-decide and test dependencies
run: |
python_version=${{ matrix.python-version }}
wheelfile=$(ls ./wheels/scikit_decide*-cp${python_version/\./}-*win*.whl)
pip install ${wheelfile}[all]
pip install ${wheelfile}[all] pytest gymnasium[classic-control]

- name: Test with pytest
run: |
Expand All @@ -391,10 +387,7 @@ jobs:
# test minizinc
python -c "import minizinc; print(minizinc.default_driver.minizinc_version); minizinc.Solver.lookup('gecode')"
# run pytest
pytest -v -s tests/autocast
pytest -v -s tests/solvers/cpp
pytest -v -s tests/solvers/python
pytest -v -s tests/scheduling
pytest -v -s tests

test-macos:
needs: [build-macos, build-ubuntu, build-windows, setup]
Expand Down Expand Up @@ -422,10 +415,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install pytest

- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -461,11 +450,11 @@ jobs:
${{ env.minizinc_config_cmdline }}
minizinc --version

- name: Install scikit-decide
- name: Install scikit-decide and test dependencies
run: |
python_version=${{ matrix.python-version }}
wheelfile=$(ls ./wheels/scikit_decide*-cp${python_version/\./}-*macos*.whl)
pip install ${wheelfile}[all]
pip install ${wheelfile}[all] pytest gymnasium[classic-control]

- name: Test with pytest
run: |
Expand All @@ -474,10 +463,7 @@ jobs:
# test minizinc
python -c "import minizinc; print(minizinc.default_driver.minizinc_version); minizinc.Solver.lookup('gecode')"
# run pytest
pytest -v -s tests/autocast
pytest -v -s tests/solvers/cpp
pytest -v -s tests/solvers/python
pytest -v -s tests/scheduling
pytest -v -s tests

test-ubuntu:
needs: [build-macos, build-ubuntu, build-windows, setup]
Expand All @@ -502,10 +488,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install pytest

- name: Download artifacts
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -542,11 +524,11 @@ jobs:
${{ env.minizinc_config_cmdline }}
minizinc --version

- name: Install scikit-decide
- name: Install scikit-decide and test dependencies
run: |
python_version=${{ matrix.python-version }}
wheelfile=$(ls ./wheels/scikit_decide*-cp${python_version/\./}-*manylinux*.whl)
pip install ${wheelfile}[all]
pip install ${wheelfile}[all] pytest gymnasium[classic-control]

- name: Test with pytest
run: |
Expand All @@ -555,10 +537,7 @@ jobs:
# test minizinc
python -c "import minizinc; print(minizinc.default_driver.minizinc_version); minizinc.Solver.lookup('gecode')"
# run pytest
pytest -v -s tests/autocast
pytest -v -s tests/solvers/cpp
pytest -v -s tests/solvers/python
pytest -v -s tests/scheduling
pytest -v -s tests

upload:
needs: [test-ubuntu, test-macos, test-windows]
Expand Down
Loading