44
55name : Run tests
66
7- on : [pull_request, push]
7+ on :
8+ workflow_call :
9+ inputs :
10+ cp-version :
11+ required : true
12+ type : string
813
914jobs :
1015 run :
1116 runs-on : ubuntu-22.04
17+ env :
18+ CP_VERSION : ${{ inputs.cp-version }}
1219 steps :
1320 - name : Set up repository
1421 uses : actions/checkout@v3
1825 - name : Set up circuitpython repository
1926 uses : actions/checkout@v3
2027 with :
28+ ref : ${{ inputs.cp-version }}
2129 repository : adafruit/circuitpython
2230 path : ./circuitpython/
2331 submodules : false
@@ -32,14 +40,26 @@ jobs:
3240 run : python tools/ci_fetch_deps.py tests
3341 shell : bash
3442 working-directory : ./circuitpython/
43+ - name : Fetch relevant submodules
44+ id : submodules
45+ run : python tools/ci_fetch_deps.py tests
46+ working-directory : ./circuitpython
3547 - name : Install python dependencies
3648 run : pip install -r requirements-dev.txt
3749 shell : bash
3850 working-directory : ./circuitpython/
51+ - name : Build mpy-cross
52+ run : make -C mpy-cross -j2
53+ working-directory : ./circuitpython/
3954 - name : Build unix port
40- run : make -C ports/unix VARIANT=coverage -j2
55+ run : make -C ports/unix VARIANT=coverage BUILD=build-coverage PROG=micropython -j2
4156 working-directory : ./circuitpython/
57+ - name : Move micropython binary to the expected location
58+ if : ${{ startsWith(inputs.cp-version, '8.2.') }}
59+ run : mv ../circuitpython/ports/unix/micropython* ../circuitpython/ports/unix/build-coverage/
60+ working-directory : tests
4261 - name : Run tests
62+ if : ${{ startsWith(inputs.cp-version, '8.2.') }}
4363 run : ./run_tests.py
4464 working-directory : tests
4565 env :
0 commit comments