/ .github / workflows / examples.yml
examples.yml
 1  name: Example Tests
 2  
 3  on:
 4    schedule:
 5      - cron: "0 0 * * *"
 6  
 7    # Allows you to run this workflow manually from the Actions tab
 8    workflow_dispatch:
 9  
10  concurrency:
11    group: ${{ github.workflow }}-${{ github.ref }}
12    cancel-in-progress: true
13  
14  jobs:
15    test-examples:
16      name: Test examples on ${{ matrix.os }} with py${{ matrix.python }}, min ${{ matrix.minimal }}
17      runs-on: ${{ matrix.os }}
18      strategy:
19        matrix:
20          os: [ubuntu-22.04]
21          python: ["3.10"]
22          minimal: [false]
23        fail-fast: false
24      steps:
25        - uses: actions/checkout@v4
26  
27        - name: 🔍 Get bikes dataset cached
28          uses: ./.github/share-actions/get-bikes-dataset-cached
29  
30        - name: Prepare Bikes dataset
31          run: unzip Bike-Sharing-Dataset.zip -d Bike-Sharing-Dataset
32  
33        - uses: actions/setup-python@v5
34          with:
35            python-version: ${{ matrix.python }}
36            architecture: "x64"
37            cache: "pip"
38            cache-dependency-path: pyproject.toml
39        - name: Install package
40          run: pip install -e .[dev,spark,fsspec]
41        - name: Install minimal reqs
42          if: matrix.minimal
43          run: pip install -r requirements.min.txt
44        - name: Prepare examples dependencies
45          run: pip install catboost sentence-transformers openai
46        - name: Export examples
47          run: jupyter nbconvert --to python examples/*/*.ipynb --output-dir example_scripts
48        - name: Run examples
49          run: python example_test.py
50          env:
51            OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY_GIT_DEV }}