-
Notifications
You must be signed in to change notification settings - Fork 17
63 lines (60 loc) · 1.85 KB
/
run-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
#
# SPDX-License-Identifier: MIT
name: Run tests
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
with:
submodules: false
fetch-depth: 1
- name: Set up circuitpython repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.cp-version }}
repository: adafruit/circuitpython
path: ./circuitpython/
submodules: false
fetch-depth: 1
fetch-tags: true
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: CircuitPython dependencies
id: cp-deps
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 BUILD=build-coverage PROG=micropython -j2
working-directory: ./circuitpython/
- name: Run tests
run: ./run_tests.py
working-directory: tests
env:
MICROPY_CPYTHON3: python3.8
MICROPY_MICROPYTHON: ../circuitpython/ports/unix/build-coverage/micropython
MICROPYPATH: ../:../circuitpython/frozen/Adafruit_CircuitPython_Ticks