CI: Add support for MicroPython #15
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: "Tests" | |
on: | |
push: | |
branches: [ main ] | |
pull_request: ~ | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-cpython: | |
name: " | |
CPython ${{ matrix.python-version }} | |
" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu-latest'] | |
python-version: ['3.13'] | |
env: | |
OS: ${{ matrix.os }} | |
PYTHON: ${{ matrix.python-version }} | |
services: | |
cratedb: | |
image: crate/crate:nightly | |
ports: | |
- 4200:4200 | |
steps: | |
- name: Acquire sources | |
uses: actions/checkout@v4 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
architecture: x64 | |
cache: 'pip' | |
cache-dependency-path: | | |
pyproject.toml | |
requirements*.txt | |
- name: Set up project requirements and tools | |
run: uv pip install --system --requirement=requirements.txt --requirement=requirements-dev.txt | |
- name: Run linters and software tests | |
run: poe check-cpython | |
# https://github.com/codecov/codecov-action | |
- name: Upload coverage results to Codecov | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: ./coverage.xml | |
flags: main | |
env_vars: OS,PYTHON | |
name: codecov-umbrella | |
fail_ci_if_error: false | |
test-micropython: | |
name: " | |
MicroPython ${{ matrix.micropython-version }} | |
" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['ubuntu-latest'] | |
micropython-version: [ | |
'v1.10.0', | |
'v1.20.0', | |
'v1.24.0', | |
] | |
env: | |
OS: ${{ matrix.os }} | |
MICROPYTHON: ${{ matrix.micropython-version }} | |
services: | |
cratedb: | |
image: crate/crate:nightly | |
ports: | |
- 4200:4200 | |
steps: | |
- name: Acquire sources | |
uses: actions/checkout@v4 | |
# https://github.com/marketplace/actions/install-micropython | |
- name: Set up MicroPython ${{ matrix.micropython-version }} | |
uses: BrianPugh/install-micropython@v2 | |
with: | |
reference: ${{ matrix.micropython-version }} | |
- name: Set up project requirements | |
run: micropython -m mip install base64 urequests | |
- name: Run linters and software tests | |
run: poe check-micropython |