chore(state-manager): update state manager python version & update dependencies #486
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 runs test and lint on branch pushes that touch the | |
# state_manager project. | |
name: 'state_manager Lint & Test' | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'release-*' | |
pull_request: | |
paths: | |
- 'state_manager/state_manager/**' | |
- 'state_manager/tests/**' | |
- 'state_manager/generate_state_manager_headers.py' | |
- 'state_manager/CMakeLists.txt' | |
- 'state_manager/pyproject.toml' | |
- '.github/workflows/state_manager.yaml' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
lint-test: | |
name: 'state_manager linting and tests' | |
runs-on: 'ubuntu-20.04' | |
steps: | |
- name: Update and install gcc-10 & g++-10 | |
run: | | |
sudo apt update | |
sudo apt install gcc-10 g++-10 | |
- name: Checkout ot3-firmware repository | |
uses: actions/checkout@v3 | |
with: | |
path: ot3-firmware | |
- name: Checkout opentrons repository | |
uses: actions/checkout@v3 | |
with: | |
repository: "Opentrons/opentrons" | |
path: opentrons | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Cache stm32-tools | |
uses: "actions/cache@v3" | |
with: | |
path: "./stm32-tools" | |
key: ${{ runner.os }}-${{ hashFiles('**/cmake/*') }}-${{ secrets.CACHE_VERSION }} | |
- name: Build Host | |
run: cmake --preset=host-gcc10 . | |
working-directory: ot3-firmware | |
- name: Setup repo | |
run: cmake --build --preset simulators | |
working-directory: ot3-firmware | |
- name: Lint | |
run: cmake --build ./build-host/ --target state-manager-lint | |
working-directory: ot3-firmware | |
- name: Test | |
run: cmake --build ./build-host/ --target state-manager-test | |
working-directory: ot3-firmware | |
- name: Upload Coverage Report | |
uses: 'codecov/codecov-action@v2' | |
with: | |
files: ./ot3-firmware/state-manager/coverage.xml | |
flags: state-manager |