-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: extract current github jobs for reuse * Add runner as an option to all workflows * refactor: mark tests that require docker explicitly
- Loading branch information
1 parent
efd20a8
commit 294572e
Showing
6 changed files
with
163 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
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] | ||
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 python -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: Intelligence Layer SDK Tests | ||
|
||
on: | ||
push: | ||
paths-ignore: | ||
- "trace-viewer/**" | ||
- ".github/workflows/frontend.yml" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
python-tests: | ||
uses: ./.github/workflows/sdk-tests.yml | ||
with: | ||
runner: 'ubuntu-latest' | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters