Skip to content

Commit e0563d6

Browse files
authored
add ci (#3)
* add ci
1 parent a3cd768 commit e0563d6

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: MicroPython CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
jobs:
12+
test:
13+
name: Run Tests and Linting
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
# Step 1: Checkout the repository
18+
- name: Checkout Code
19+
uses: actions/checkout@v3
20+
21+
# Step 2: Set up Python
22+
- name: Set up Python
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: 3.11
26+
27+
# Step 3: Install dependencies
28+
- name: Install Dependencies
29+
run: |
30+
python -m pip install --upgrade pip
31+
pip install -r requirements.txt
32+
33+
# Step 4: Run linting
34+
- name: Run Linting
35+
run: |
36+
ruff format src tests
37+
ruff check src tests --fix --exit-zero --line-length 100 --target-version py38
38+
39+
# Step 5: Run tests
40+
- name: Run Tests
41+
run: |
42+
PYTHONPATH=src pytest -svv

0 commit comments

Comments
 (0)