-
Notifications
You must be signed in to change notification settings - Fork 6
89 lines (82 loc) · 2.95 KB
/
daily.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: "os-support-tests"
on:
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]
timeout-minutes: 15
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 pytest -n 10 -m "not docker"
run-notebooks:
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
timeout-minutes: 15
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/documentation/.ipynb_checkpoints
rm -rf src/documentation/how_tos/.ipynb_checkpoints
find src/documentation -name "*.nbconvert.ipynb" -type f -delete
find src/documentation -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/documentation -name "*.nbconvert.ipynb" -type f -delete