Skip to content

fix: exclude docker-based notebooks, no -- #6

fix: exclude docker-based notebooks, no --

fix: exclude docker-based notebooks, no -- #6

Workflow file for this run

name: "os-support-tests"
on:
# TODO temporary
push:
workflow_dispatch:
# Scheduled workflows will only run on the default branch.
schedule:
- cron: '0 0 * * *' # runs once a day at midnight in the timezone of your GitHub repository
defaults:
run:
shell: bash
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
runs-on: ${{matrix.os}}
# difference to regular test: no docker, no venv caching
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dependencies
run: |
poetry config installer.max-workers 10
poetry install --no-interaction
- name: Run pytest
env:
AA_TOKEN: ${{ secrets.AA_TOKEN }}
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
ARGILLA_API_URL: "http://localhost:6900/"
ARGILLA_API_KEY: "argilla.apikey"
CLIENT_URL: "https://api.aleph-alpha.com"
run: |
poetry run python3 -c "import nltk; nltk.download('punkt')"
poetry run pytest -n 10 -m "not docker"
run-notebooks:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
runs-on: ${{matrix.os}}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Install dependencies
run: |
poetry config installer.max-workers 10
poetry install --no-interaction
- name: Configure Poetry for notebooks and run
env:
AA_TOKEN: ${{ secrets.AA_TOKEN }}
HUGGING_FACE_TOKEN: ${{ secrets.HUGGING_FACE_TOKEN }}
ARGILLA_API_URL: "http://localhost:6900/"
ARGILLA_API_KEY: "argilla.apikey"
CLIENT_URL: "https://api.aleph-alpha.com"
run: |
[ -f .env ] && source .env
export AA_TOKEN
# Find all .ipynb files in the directory and pass them to xargs for parallel execution
rm -rf src/examples/.ipynb_checkpoints
rm -rf src/examples/how_tos/.ipynb_checkpoints
find src/examples -name "*.nbconvert.ipynb" -type f -delete
find src/examples -name "*.ipynb" ! -name "performance_tips.ipynb" ! -name "human_evaluation.ipynb" ! -name "how_to_human_evaluation_via_argilla.ipynb" | xargs -n 1 -P 6 poetry run jupyter nbconvert --to notebook --execute
find src/examples -name "*.nbconvert.ipynb" -type f -delete