Examples as Tests #292
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
name: Examples as Test | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
# Format: minute hour day-of-month month day-of-week(starts on sunday) | |
# Scheduled for 2 am, every sunday, tuesday, friday | |
- cron: '0 10 * * 0,2,5' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: [self-hosted, linux, gpu] | |
if: github.repository == 'StanfordVL/OmniGibson-dev' | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
path: omnigibson | |
- name: Add CUDA to env | |
run: echo "/usr/local/cuda/bin" >> $GITHUB_PATH | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.8" | |
architecture: x64 | |
- name: Install dev requirements | |
working-directory: omnigibson | |
run: pip install -r requirements-dev.txt | |
- name: Install additional dev requirements | |
working-directory: omnigibson | |
run: pip install -r tests/requirements-tests.txt | |
- name: Install | |
working-directory: omnigibson | |
run: pip install -e . | |
- name: Uninstall pip bddl | |
working-directory: omnigibson | |
run: pip uninstall -y bddl | |
- name: Checkout BDDL | |
uses: actions/checkout@v2 | |
with: | |
repository: StanfordVL/bddl-dev | |
ref: 581be50e7cfd2b3a1447aaa1b4fc2424b673339c | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # PAT is required since this is a different repo | |
path: bddl | |
submodules: recursive | |
lfs: true | |
- name: Install BDDL | |
working-directory: bddl | |
run: pip install -e . | |
- name: Link Dataset | |
working-directory: omnigibson | |
run: ln -s /scr/ig-data omnigibson/data | |
- name: Create tests of examples | |
working-directory: omnigibson | |
run: python tests/create_tests_of_examples.py | |
- name: Run tests | |
working-directory: omnigibson | |
run: pytest /tmp/tests_of_examples | |
- name: Remove Files | |
uses: JesseTG/[email protected] | |
with: | |
path: /tmp/tests_of_examples |