Skip to content

Test self-hosted runner #4

Test self-hosted runner

Test self-hosted runner #4

# This workflow will install Python dependencies, run unit_tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: SIMPA local tests
on:
# run SIMPA tests on pushes to the main or develop branch
push:
branches: [ main, develop ]
# and on all pull requests to the main or develop branch
pull_request:
branches: [ main, develop ]
# as well as upon manual triggers through the 'Actions' tab of the GitHub UI
workflow_dispatch:
# Additionally, run Friday morning 6AM, so that we can react quickly if things break
schedule:
- cron: "0 5 * * 5"
jobs:
build:
runs-on: self-hosted
steps:
- name: Clean current working directory
run: |
pwd
rm -rf /home/tom/dev/actions-runner/_work/simpa/simpa
- uses: actions/checkout@v2
- name: Create and activate virtual env
run: |
pwd
python3 -m venv runner-env
source runner-env/bin/activate
- name: Install simpa
run: |
python -m pip install --upgrade pip
python -m pip install .
- name: Testing
run: |
python simpa_examples/optical_and_acoustic_simulation.py
- name: Deactivate virtual env
run: |
deactivate