Skip to content

Add I2C target and SPI peripheral ports to IoController base, update SPI and I2C naming #916

Add I2C target and SPI peripheral ports to IoController base, update SPI and I2C naming

Add I2C target and SPI peripheral ports to IoController base, update SPI and I2C naming #916

Workflow file for this run

# Based on https://sagarsonwane230797.medium.com/automate-build-checks-and-slack-notification-with-github-actions-3b7eb702dae6
# mypy: https://doedotdev.medium.com/mypy-for-github-action-7da1ebee99e7
# optimization: https://github.com/marketplace/actions/skip-duplicate-actions#usage-examples
name: Python PR build and tests
on:
pull_request:
types: [assigned, opened, synchronize, reopened, ready_for_review]
jobs:
pre_job:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
paths: '[
"compiler/**",
"edg_core/**",
"electronics_model/**",
"electronics_abstract_parts/**",
"electronics_lib/**",
"edg/**",
"examples/**.py"
]'
mypy_latest_3_11:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: install mypy
run: |
pip install mypy mypy-protobuf types-protobuf types-Deprecated
mypy --version
- name: mypy
run: mypy --install-types .
unittest_latest_3_11:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: install dependencies
run: pip install -r requirements.txt
- name: unittest
run: python -m unittest discover
packagetest_latest_3_11:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.11'
- name: install dependencies
run: pip install -r requirements.txt
- name: package
run: python -m pip install .
- name: unittest
run: cd examples && python -m unittest test_blinky
- name: toptest
run: cd examples && python test_blinky.py
mypy_latest_3_9:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.9'
- name: install mypy
run: |
pip install mypy mypy-protobuf types-protobuf types-Deprecated
mypy --version
- name: mypy
run: mypy --install-types .
unittest_latest_3_9:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
with:
python-version: '3.9'
- name: install dependencies
run: pip install -r requirements.txt
- name: unittest
run: python -m unittest discover