Skip to content

Commit 6c21d0f

Browse files
committed
chore: add ci to run tests
1 parent b5a0d1b commit 6c21d0f

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

Diff for: .github/workflows/run-tests.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors)
2+
#
3+
# SPDX-License-Identifier: MIT
4+
5+
name: Run tests
6+
7+
on: [pull_request, push]
8+
9+
jobs:
10+
run:
11+
runs-on: ubuntu-22.04
12+
steps:
13+
- name: Set up repository
14+
uses: actions/checkout@v3
15+
with:
16+
submodules: false
17+
fetch-depth: 1
18+
- name: Set up circuitpython repository
19+
uses: actions/checkout@v3
20+
with:
21+
repository: adafruit/circuitpython
22+
path: ./circuitpython/
23+
submodules: false
24+
fetch-depth: 1
25+
fetch-tags: true
26+
- name: Set up python
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: 3.8
30+
- name: CircuitPython dependencies
31+
id: cp-deps
32+
run: python tools/ci_fetch_deps.py tests
33+
shell: bash
34+
working-directory: ./circuitpython/
35+
- name: Install python dependencies
36+
run: pip install -r requirements-dev.txt
37+
shell: bash
38+
working-directory: ./circuitpython/
39+
- name: Build unix port
40+
run: make -C ports/unix VARIANT=coverage -j2
41+
working-directory: ./circuitpython/
42+
- name: Run tests
43+
run: ./run_tests.py
44+
working-directory: tests
45+
env:
46+
MICROPY_CPYTHON3: python3.8
47+
MICROPY_MICROPYTHON: ../circuitpython/ports/unix/build-coverage/micropython
48+
MICROPYPATH: ../:../circuitpython/frozen/Adafruit_CircuitPython_Ticks

0 commit comments

Comments
 (0)