Fix failing tests #564
This file contains 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: | |
pull_request: | |
branches: | |
- "*" | |
push: | |
branches: | |
- main | |
jobs: | |
run: | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
python-version: ["3.12", "3.11", "3.10"] | |
env: | |
DISPLAY: ':99.0' | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build River | |
uses: ./.github/actions/install-env | |
with: | |
python-version: "3.12" | |
- name: Cache River datasets | |
uses: actions/cache@v3 | |
with: | |
path: ~/river_data | |
key: ${{ runner.os }} | |
- name: Cache scikit-learn datasets | |
uses: actions/cache@v3 | |
with: | |
path: ~/scikit_learn_data | |
key: ${{ runner.os }} | |
- name: Download datasets | |
run: | | |
poetry run python -c "from river import datasets; datasets.CreditCard().download(); datasets.Elec2().download(); datasets.SMSSpam().download()" | |
poetry run python -c "from river import bandit; bandit.datasets.NewsArticles().download()" | |
- uses: tlambert03/setup-qt-libs@v1 | |
- name: build "display" | |
run: | | |
/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1920x1200x24 -ac +extension GLX | |
- name: Install gdb | |
run: sudo apt-get update && sudo apt-get install -y gdb | |
- name: pytest | |
run: | | |
poetry run pytest || true | |
find . \( -name "*.core" -o -name core \) -exec gdb --batch --quiet -ex "thread apply all bt" "$(readlink -f $(which python3))" {} \; | |
test -z "$(find . \( -name "*.core" -o -name core \) -print -quit)" | |
# poetry run pytest -m "not datasets" --durations=10 -n logical # Run pytest on all logical CPU cores |