Skip to content

Examples as Test B #507

Examples as Test B

Examples as Test B #507

name: Examples as Test B
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, everyday
- cron: '0 10 * * *'
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/behavior-dev'
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
submodules: true
path: behavior
- 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: Create virtual env
run: python -m venv env
- name: Install dev requirements
working-directory: behavior
run: |
source ../env/bin/activate
pip install -r requirements-dev.txt
- name: Install
working-directory: behavior
run: |
source ../env/bin/activate
pip install -e .
- name: Uninstall pip igibson
working-directory: behavior
run: |
source ../env/bin/activate
pip uninstall -y igibson
- name: Checkout iGibson
uses: actions/checkout@v2
with:
repository: StanfordVL/iGibson-dev
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} # PAT is required since this is a different repo
path: igibson
submodules: recursive
lfs: true
- name: Install iGibson
working-directory: igibson
run: |
source ../env/bin/activate
pip install -e .
- name: Link Dataset
working-directory: igibson
run: ln -s /scr/ig-data igibson/data
- name: Create tests of examples
working-directory: behavior
run: |
source ../env/bin/activate
python tests/create_tests_of_examples_b.py --exhaustive
- name: Run tests
working-directory: behavior
run: |
source ../env/bin/activate
pytest /tmp/tests_of_examples_b
- name: Remove files
if: always()
run: rm -rf /tmp/tests_of_examples_b || true
- name: Cleanup virtual env
if: always()
run: rm -rf env/