update script #1893
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: CI | |
on: [pull_request, push, workflow_dispatch] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: ["ubuntu-latest"] | |
python-version: ["3.11"] | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v3 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install python libraries | |
run: | | |
pip install -e . | |
pip install -r requirements/requirements_dev.txt | |
pip install pyyaml | |
wget https://github.com/Gadgetoid/PY_LGPIO/releases/download/0.2.2.0/lgpio-0.2.2.0.tar.gz -O lgpio-0.2.2.0.tar.gz | |
tar -xvzf lgpio-0.2.2.0.tar.gz | |
cd lgpio-0.2.2.0 | |
python setup.py develop | |
pip list | |
- name: Mosquitto MQTT Broker in GitHub Actions | |
uses: Namoshek/mosquitto-github-action@v1 | |
with: | |
version: '1.6' | |
- name: Create dot_pioreactor folder | |
run: | | |
mkdir -p .pioreactor/storage | |
- name: Create plugin folder and seed it | |
run: | | |
mkdir -p plugins_dev | |
cat <<EOT >> plugins_dev/example_plugin.py | |
import click | |
from pioreactor.background_jobs.base import BackgroundJob | |
__plugin_version__ = "0.0.1" | |
class ExamplePlugin(BackgroundJob): | |
job_name="example_plugin" | |
def __init__(self): | |
super().__init__(unit="test", experiment="test") | |
@click.command(name="example_plugin") | |
def click_example_plugin(): | |
job = ExamplePlugin() | |
EOT | |
- name: Run tests | |
run: | | |
pytest pioreactor/tests/ -vv --timeout 600 --random-order --durations 15 | |
pytest pioreactor/tests/test_automation_imports.py | |
env: | |
TESTING: 1 | |
TMPDIR: /tmp/ |