fix 26.8 update scripts, and docs #3327
This file contains hidden or 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: | |
| frontend-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v6 | |
| - name: Setup node | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: "25" | |
| cache: npm | |
| cache-dependency-path: frontend/package-lock.json | |
| - name: Run frontend tests | |
| run: | | |
| make frontend-test | |
| backend-test: | |
| runs-on: ubuntu-latest | |
| env: | |
| TESTING: 1 | |
| DOT_PIOREACTOR: ${{ github.workspace }}/.pioreactor | |
| GLOBAL_CONFIG: ${{ github.workspace }}/.pioreactor/config.ini | |
| RUN_PIOREACTOR: ${{ github.workspace }}/run/pioreactor | |
| LG_WD: ${{ github.workspace }}/run/pioreactor | |
| TMPDIR: /tmp/ | |
| PIO_VENV: ${{ github.workspace }}/.venv | |
| VIRTUAL_ENV: ${{ github.workspace }}/.venv | |
| PIO_EXECUTABLE: ${{ github.workspace }}/.venv/bin/pio | |
| PIOS_EXECUTABLE: ${{ github.workspace }}/.venv/bin/pios | |
| PLUGINS_DEV: ${{ github.workspace }}/plugins_dev | |
| HARDWARE: 1.2 | |
| FIRMWARE: 0.5 | |
| BLINKA_FORCECHIP: BCM2XXX | |
| BLINKA_FORCEBOARD: RASPBERRY_PI_3A_PLUS | |
| MODEL_NAME: pioreactor_40ml | |
| MODEL_VERSION: 1.5 | |
| steps: | |
| - name: Checkout source | |
| uses: actions/checkout@v4 | |
| - name: Setup python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.13" | |
| - name: Install python libraries into env | |
| run: | | |
| # env create in make install | |
| make install | |
| 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 | |
| # Install lgpio into the venv created by `make install`. | |
| # Note: keep working directory at repo root so `.venv` is resolvable. | |
| .venv/bin/python -m pip install -e ./lgpio-0.2.2.0 | |
| .venv/bin/pip list | |
| - name: Mosquitto MQTT Broker in GitHub Actions | |
| uses: Namoshek/mosquitto-github-action@v1 | |
| with: | |
| version: '1.6' | |
| - name: Install any other required linux software | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install avahi-daemon avahi-discover avahi-utils mosquitto-clients | |
| - name: Create pioreactor folders | |
| run: | | |
| mkdir -p "$RUN_PIOREACTOR" | |
| mkdir -p "$RUN_PIOREACTOR/cache" | |
| touch "$RUN_PIOREACTOR/cache/huey.db" | |
| mkdir -p "$DOT_PIOREACTOR" | |
| mv config.dev.ini "$DOT_PIOREACTOR"/config.ini | |
| mkdir -p "$DOT_PIOREACTOR"/storage | |
| mkdir -p "$DOT_PIOREACTOR"/hardware/hats/1.2 | |
| mkdir -p "$DOT_PIOREACTOR"/hardware/models/pioreactor_40ml/1.5 | |
| cat <<'EOF_HW' > "$DOT_PIOREACTOR"/hardware/hats/1.2/pwm.yaml | |
| heater_pwm_channel: "5" | |
| pwm_to_pin: | |
| "1": 17 | |
| "2": 13 | |
| "3": 16 | |
| "4": 12 | |
| "5": 18 | |
| EOF_HW | |
| cat <<'EOF_HW' > "$DOT_PIOREACTOR"/hardware/hats/1.2/dac.yaml | |
| address: 0x2C | |
| EOF_HW | |
| cat <<'EOF_HW' > "$DOT_PIOREACTOR"/hardware/hats/1.2/temp.yaml | |
| address: 0x4F | |
| EOF_HW | |
| cat <<'EOF_HW' > "$DOT_PIOREACTOR"/hardware/hats/1.2/adc.yaml | |
| aux: | |
| driver: pico | |
| address: 0x2C | |
| channel: 1 | |
| version: | |
| driver: pico | |
| address: 0x2C | |
| channel: 0 | |
| pd1: | |
| driver: pico | |
| address: 0x2C | |
| channel: 2 | |
| pd2: | |
| driver: pico | |
| address: 0x2C | |
| channel: 3 | |
| EOF_HW | |
| cat <<'EOF_HW' > "$DOT_PIOREACTOR"/hardware/hats/1.2/gpio.yaml | |
| pcb_led_pin: 23 | |
| pcb_button_pin: 4 | |
| hall_sensor_pin: 21 | |
| sda_pin: 2 | |
| scl_pin: 3 | |
| EOF_HW | |
| cat <<'EOF_HW' > "$DOT_PIOREACTOR"/hardware/models/pioreactor_40ml/1.5/adc.yaml | |
| pd1: | |
| driver: ads1114 | |
| address: 0x48 | |
| channel: 0 | |
| pd2: | |
| driver: ads1114 | |
| address: 0x49 | |
| channel: 0 | |
| EOF_HW | |
| mkdir -p "$DOT_PIOREACTOR/plugins" | |
| mkdir -p "$DOT_PIOREACTOR/ui/jobs" | |
| mkdir -p "$DOT_PIOREACTOR/ui/automations/dosing" | |
| mkdir -p "$DOT_PIOREACTOR/plugins/ui/jobs" | |
| mkdir -p "$DOT_PIOREACTOR/plugins/ui/automations/dosing" | |
| cat <<'EOF_UI' > "$DOT_PIOREACTOR"/ui/jobs/00_stirring.yaml | |
| --- | |
| display_name: Stirring | |
| job_name: stirring | |
| display: true | |
| source: app | |
| description: Start the stirring on the Pioreactor. | |
| published_settings: | |
| - key: target_rpm | |
| unit: RPM | |
| label: Target stir RPM | |
| description: Modify the target RPM of stirring. | |
| type: numeric | |
| display: true | |
| EOF_UI | |
| cat <<'EOF_UI' > "$DOT_PIOREACTOR"/ui/jobs/50_self_test.yaml | |
| --- | |
| display_name: Self test | |
| job_name: self_test | |
| display: true | |
| source: app | |
| description: Run the hardware and software self test suite. | |
| published_settings: [] | |
| EOF_UI | |
| cat <<'EOF_UI' > "$DOT_PIOREACTOR"/ui/automations/dosing/chemostat.yaml | |
| --- | |
| display_name: Chemostat | |
| automation_name: chemostat | |
| description: Add and remove a constant volume of media on a fixed schedule. | |
| fields: | |
| - key: duration | |
| default: 20 | |
| unit: min | |
| label: Time between dosing | |
| type: numeric | |
| - key: exchange_volume_ml | |
| default: 0.5 | |
| unit: mL | |
| label: Exchange volume | |
| type: numeric | |
| EOF_UI | |
| cat <<'EOF_UI' > "$DOT_PIOREACTOR"/ui/automations/dosing/turbidostat.yaml | |
| --- | |
| display_name: Turbidostat | |
| automation_name: turbidostat | |
| description: Keep the culture near a target biomass by exchanging media. | |
| fields: | |
| - key: target_normalized_od | |
| default: 1.0 | |
| unit: AU | |
| label: Target normalized OD | |
| type: numeric | |
| EOF_UI | |
| cat <<'EOF_UI' > "$DOT_PIOREACTOR"/plugins/ui/jobs/90_example_plugin.yaml | |
| --- | |
| display_name: Example plugin | |
| job_name: example_plugin | |
| display: true | |
| source: my-example-plugin | |
| description: Example plugin job descriptor for CI. | |
| published_settings: [] | |
| EOF_UI | |
| cat <<'EOF_UI' > "$DOT_PIOREACTOR"/plugins/ui/automations/dosing/90_example_plugin_automation.yaml | |
| --- | |
| display_name: Example plugin automation | |
| automation_name: example_plugin_automation | |
| source: my-example-plugin | |
| description: Example plugin automation descriptor for CI. | |
| fields: | |
| - key: target | |
| default: 0.5 | |
| unit: AU | |
| label: Target | |
| type: numeric | |
| EOF_UI | |
| ls "$DOT_PIOREACTOR" | |
| make check-env | |
| - name: Create plugin folder and seed it | |
| run: | | |
| mkdir -p "$PLUGINS_DEV" | |
| cat <<'EOF_PLUGIN' > "$PLUGINS_DEV"/example_plugin.py | |
| import click | |
| from pioreactor.background_jobs.base import BackgroundJob | |
| __plugin_version__ = "0.2.0" | |
| __plugin_name__ = "my-example-plugin" | |
| 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() | |
| EOF_PLUGIN | |
| - name: Start web API | |
| run: | | |
| make web-dev & | |
| sleep 5 | |
| - name: Run fast tests | |
| run: | | |
| make fast-test | |
| - name: Run slow tests | |
| run: | | |
| make slow-test | |
| - name: Run flakey tests | |
| run: | | |
| make flakey-test || true |