Add github action to run unit tests on every PR #2
Workflow file for this run
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: "Run Tests" | |
on: | |
- workflow_dispatch | |
- pull_request | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies and local packages | |
run: python -m pip install mpremote | |
- name: Install MicroPython | |
uses: BrianPugh/install-micropython@v2 | |
- name: Install Micropython dependencies | |
run: micropython -m mip install unittest | |
- name: Run tests | |
run: python -m ci.test |