Test self-hosted runner #8
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 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: | |
- uses: actions/checkout@v2 | |
- name: Create a clean new virtual env and activate it | |
run: | | |
ls | |
pwd | |
rm -rf runner-env | |
python3 -m venv runner-env | |
which python3 | |
source runner-env/bin/activate | |
which python | |
- 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 |