Created
June 19, 2024 08:53
-
-
Save tcapelle/93e3b8e01a05f968e247499d362b1f39 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
name: Build and Test Locally | |
on: | |
workflow_dispatch: #allows repo admins to trigger this workflow from the Actions tab | |
inputs: | |
create_github_issue: | |
type: boolean | |
description: 'Create issues on failing notebooks' | |
default: false | |
nbs_list: | |
type: choice | |
description: 'List of notebooks to test' | |
options: | |
- 'tutorials.txt' | |
- 'examples.txt' | |
default: 'tutorials.txt' | |
defaults: | |
run: | |
shell: bash # default shell is sh | |
jobs: | |
run-tests: | |
container: | |
image: us-docker.pkg.dev/colab-images/public/runtime:latest | |
options: --gpus all --shm-size "16gb" --entrypoint /bin/bash | |
env: | |
WANDB_API_KEY: ${{ secrets.WANDB_API_KEY }} | |
TF_CPP_MIN_LOG_LEVEL: 3 | |
runs-on: [self-hosted, A10] | |
steps: | |
- name: setup | |
run: | | |
echo "Installing dependencies" | |
python3 -m pip install -U requests wandb ghapi simple_parsing weave | |
python3 -m pip install git+https://github.com/wandb/nb_helpers | |
echo "Add current folder to git safe" | |
git config --global --add safe.directory $(pwd) | |
- name: log-to-wandb | |
run: | | |
wandb login | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: clone-examples | |
run: | | |
echo "Cloning examples" | |
git clone https://github.com/wandb/examples.git /examples | |
- name: run-tests | |
env: | |
CONTEXT_GITHUB: ${{ toJson(github) }} | |
run: | | |
while IFS= read -r nb_name; do | |
echo "Running test: $nb_name" | |
python3 run_one.py --nb_name="/$nb_name" --create_github_issue=${{ github.event.inputs.create_github_issue }} | |
done < ${{ github.event.inputs.nbs_list }} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment