ci: test on pico-sdk 2.0.0 #143
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: Test MicroPython Releases | |
on: | |
push: | |
pull_request: | |
branches: [main] | |
jobs: | |
test-micropython: | |
name: Micropython ${{ matrix.micropython_version }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
micropython_version: | |
- 20210618-v1.16 | |
- 20210902-v1.17 | |
- 20220117-v1.18 | |
- 20220618-v1.19.1 | |
- 20230426-v1.20.0 | |
- 20231005-v1.21.0 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
- name: Install packages | |
run: npm ci | |
- name: Install Python requirements | |
run: cd test && pip install -r requirements.txt | |
- name: Download Micropython | |
run: curl -o micropython.uf2 "https://micropython.org/resources/firmware/RPI_PICO-${VERSION}.uf2" | |
env: | |
VERSION: ${{ matrix.micropython_version }} | |
- name: Create filesystem | |
run: python test/mklittlefs.py littlefs.img test/micropython/main.py | |
- name: Test Micropython | |
run: timeout 10 npm run start:micropython -- --image micropython.uf2 --expect-text "Hello, MicroPython!" | |
- name: Create SPI test filesystem | |
run: python test/mklittlefs.py littlefs-spi.img test/micropython/main-spi.py | |
- name: Test Micropython SPI | |
run: timeout 10 npm run test:micropython-spi -- "hello world" "h" "0123456789abcdef0123456789abcdef0123456789abcdef" |