Skip to content

Example Tests

Example Tests #87

Workflow file for this run

name: Example Tests
on:
schedule:
- cron: "0 0 * * *"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-examples:
name: Test examples on ${{ matrix.os }} with py${{ matrix.python }}, min ${{ matrix.minimal }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
python: ["3.8"]
minimal: [false]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
id: cache-bikes-dataset
env:
cache-name: cache-bikes-dataset
with:
path: Bike-Sharing-Dataset.zip
key: cache-bikes-dataset
- name: Download test data
if: ${{ steps.cache-bikes-dataset.outputs.cache-hit != 'true' }}
run:
curl -k https://archive.ics.uci.edu/static/public/275/bike+sharing+dataset.zip -o Bike-Sharing-Dataset.zip
- name: Prepare test data
if: ${{ steps.cache-bikes-dataset.outputs.cache-hit != 'true' }}
run:
unzip Bike-Sharing-Dataset.zip -d Bike-Sharing-Dataset
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: "x64"
cache: "pip"
cache-dependency-path: setup.py
- name: Install package
run: pip install -e .[dev,spark,fsspec]
- name: Install minimal reqs
if: matrix.minimal
run: pip install -r requirements.min.txt
- name: Prepare examples dependencies
run: pip install catboost sentence-transformers
- name: Export examples
run: jupyter nbconvert --to python examples/*/*.ipynb --output-dir example_scripts
- name: Run examples
run: python example_test.py