Skip to content

Commit de90a82

Browse files
committed
Initial commit
0 parents  commit de90a82

File tree

8 files changed

+738
-0
lines changed

8 files changed

+738
-0
lines changed

.github/workflows/ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: ci
2+
3+
on:
4+
push:
5+
paths-ignore:
6+
- "README.md"
7+
8+
jobs:
9+
test:
10+
name: test
11+
runs-on: ubuntu-latest
12+
env:
13+
MICROPYPATH: ".frozen:~/.micropython/lib:/usr/lib/micropython:$(pwd)"
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Set up Python 3.11
17+
uses: actions/setup-python@v2
18+
with:
19+
python-version: "3.11"
20+
- name: Install python dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -r dev-requirements.txt
24+
- name: Install system dependencies
25+
run: |
26+
sudo apt-get update
27+
sudo apt-get install -y build-essential git pkg-config libffi-dev
28+
- name: Build micropython
29+
run: |
30+
git clone --depth 1 https://github.com/micropython/micropython.git
31+
cd micropython
32+
git submodule update --init
33+
make -C mpy-cross
34+
make -C ports/unix
35+
cp ports/unix/build-standard/micropython ../bin
36+
cd ..
37+
rm -rf micropython
38+
- name: Install micropython dependencies
39+
run: cat requirements.txt test-requirements.txt | grep -v "^$" | xargs -n 1 ./bin/micropython -m mip install
40+
- name: Install the package
41+
run: ./bin/micropython -m mip install ./package.json
42+
- name: Run tests
43+
run: ./bin/micropython -m unittest

README.md

Whitespace-only changes.

manifest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
metadata(version="0.1.0")
2+
module("thermostat.py")

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"urls": [
3+
["thermostat.py", "thermostat.py"]
4+
],
5+
"deps": [
6+
["time", "latest"],
7+
["logging", "latest"]
8+
],
9+
"version": "0.1.0"
10+
}

test-requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
unittest
2+
unittest-discover

tests/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)