Skip to content

Commit

Permalink
Run example tests on schedule (#1083)
Browse files Browse the repository at this point in the history
* Run example tests on schedule

* Run example tests on schedule
  • Loading branch information
mike0sv authored Apr 25, 2024
1 parent c0d8532 commit 585cfb1
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 34 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
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-latest]
python: ["3.8"]
minimal: [false]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: "x64"
cache: "pip"
- 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: Download test data
run:
curl -k https://archive.ics.uci.edu/static/public/275/bike+sharing+dataset.zip -o Bike-Sharing-Dataset.zip &&
unzip Bike-Sharing-Dataset.zip -d Bike-Sharing-Dataset
- name: Run examples
run: python example_test.py
34 changes: 0 additions & 34 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,40 +127,6 @@ jobs:
- name: Run Tests
run: python -m pytest --durations=50

test-examples:
name: Test examples on ${{ matrix.os }} with py${{ matrix.python }}, min ${{ matrix.minimal }}
needs: test
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false
strategy:
matrix:
os: [ubuntu-latest]
python: ["3.8"]
minimal: [false]
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
architecture: "x64"
cache: "pip"
- 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: Download test data
run:
curl -k https://archive.ics.uci.edu/static/public/275/bike+sharing+dataset.zip -o Bike-Sharing-Dataset.zip &&
unzip Bike-Sharing-Dataset.zip -d Bike-Sharing-Dataset
- name: Run examples
run: python example_test.py

build:
# The type of runner that the job will run on
runs-on: ubuntu-20.04
Expand Down

0 comments on commit 585cfb1

Please sign in to comment.