Skip to content

Commit

Permalink
ci: explicitly test against circuitpython versions
Browse files Browse the repository at this point in the history
  • Loading branch information
imnotjames committed Nov 16, 2023
1 parent 8bcddd2 commit 8fcb511
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,8 @@ jobs:
uses: adafruit/workflows-circuitpython-libs/build@main
with:
package-prefix: "asyncio"

test-v9-0-0-alpha5:
uses: ./.github/workflows/run-tests.yml
with:
cp-version: 9.0.0-alpha.5
24 changes: 22 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@

name: Run tests

on: [pull_request, push]
on:
workflow_call:
inputs:
cp-version:
required: true
type: string

jobs:
run:
runs-on: ubuntu-22.04
env:
CP_VERSION: ${{ inputs.cp-version }}
steps:
- name: Set up repository
uses: actions/checkout@v3
Expand All @@ -18,6 +25,7 @@ jobs:
- name: Set up circuitpython repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.cp-version }}
repository: adafruit/circuitpython
path: ./circuitpython/
submodules: false
Expand All @@ -32,14 +40,26 @@ jobs:
run: python tools/ci_fetch_deps.py tests
shell: bash
working-directory: ./circuitpython/
- name: Fetch relevant submodules
id: submodules
run: python tools/ci_fetch_deps.py tests
working-directory: ./circuitpython
- name: Install python dependencies
run: pip install -r requirements-dev.txt
shell: bash
working-directory: ./circuitpython/
- name: Build mpy-cross
run: make -C mpy-cross -j2
working-directory: ./circuitpython/
- name: Build unix port
run: make -C ports/unix VARIANT=coverage -j2
run: make -C ports/unix VARIANT=coverage BUILD=build-coverage PROG=micropython -j2
working-directory: ./circuitpython/
- name: Move micropython binary to the expected location
if: ${{ startsWith(inputs.cp-version, '8.2.') }}
run: mv ../circuitpython/ports/unix/micropython* ../circuitpython/ports/unix/build-coverage/
working-directory: tests
- name: Run tests
if: ${{ startsWith(inputs.cp-version, '8.2.') }}
run: ./run_tests.py
working-directory: tests
env:
Expand Down

0 comments on commit 8fcb511

Please sign in to comment.