Skip to content

Commit 9e319f3

Browse files
committed
update CI scripts to allow running CI on the desktop (see below)
* add script to run 'act' local github actions tool (lets devs check github actions on their local machine) * Update various github actions to latest (so they can work with the 'act' tool) * change a few places where python version was not properly quoted as a string (act yaml parser is more strict than the github version) * update pylint min-version to work with recent github actions * remove pandas/riden requirement (that's in my other branch for now)
1 parent cd5913a commit 9e319f3

File tree

7 files changed

+50
-393
lines changed

7 files changed

+50
-393
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,24 @@ jobs:
1818
- "3.10"
1919
- "3.11"
2020
steps:
21-
- uses: actions/checkout@v2
21+
- uses: actions/checkout@v4
2222
- name: Install Python 3
23-
uses: actions/setup-python@v1
23+
uses: actions/setup-python@v5
2424
- name: Uninstall meshtastic
2525
run: |
26-
pip3 uninstall meshtastic
26+
pip3 uninstall -y meshtastic
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
3030
pip3 install poetry
3131
- name: Install meshtastic from local
3232
run: |
33+
poetry install
3334
poetry run meshtastic --version
3435
- name: Run pylint
3536
run: poetry run pylint meshtastic examples/ --ignore-patterns ".*_pb2.pyi?$"
3637
- name: Check types with mypy
37-
run: mypy meshtastic/
38+
run: poetry run mypy meshtastic/
3839
- name: Run tests with pytest
3940
run: poetry run pytest --cov=meshtastic
4041
- name: Generate coverage report
@@ -60,10 +61,12 @@ jobs:
6061
- "3.10"
6162
- "3.11"
6263
steps:
63-
- uses: actions/checkout@v2
64+
- uses: actions/checkout@v4
6465
- name: Install Python 3
65-
uses: actions/setup-python@v1
66+
uses: actions/setup-python@v5
6667
- name: Install meshtastic from local
6768
run: |
69+
python -m pip install --upgrade pip
70+
pip3 install poetry
6871
poetry install
69-
meshtastic --version
72+
poetry run meshtastic --version

.github/workflows/release.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
steps:
1414
- name: Checkout
15-
uses: actions/checkout@v2
15+
uses: actions/checkout@v4
1616

1717
- name: Bump version
1818
run: >-
@@ -48,9 +48,9 @@ jobs:
4848
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4949

5050
- name: Set up Python 3.9
51-
uses: actions/setup-python@v2
51+
uses: actions/setup-python@v5
5252
with:
53-
python-version: 3.9
53+
python-version: "3.9"
5454

5555
- name: Install pypa/build
5656
run: >-
@@ -79,14 +79,14 @@ jobs:
7979
# needs: release_create
8080
# steps:
8181
# - name: Checkout
82-
# uses: actions/checkout@v3
82+
# uses: actions/checkout@v4
8383
# with:
8484
# ref: ${{ needs.release_create.outputs.new_sha }}
8585

8686
# - name: Set up Python 3.9
87-
# uses: actions/setup-python@v2
87+
# uses: actions/setup-python@v5
8888
# with:
89-
# python-version: 3.9
89+
# python-version: "3.9"
9090

9191
# - name: Setup code signing
9292
# env:
@@ -125,14 +125,14 @@ jobs:
125125
needs: release_create
126126
steps:
127127
- name: Checkout
128-
uses: actions/checkout@v3
128+
uses: actions/checkout@v4
129129
with:
130130
ref: ${{ needs.release_create.outputs.new_sha }}
131131

132132
- name: Set up Python 3.9
133-
uses: actions/setup-python@v2
133+
uses: actions/setup-python@v5
134134
with:
135-
python-version: 3.9
135+
python-version: "3.9"
136136

137137
- name: Build
138138
run: |
@@ -166,14 +166,14 @@ jobs:
166166
needs: release_create
167167
steps:
168168
- name: Checkout
169-
uses: actions/checkout@v3
169+
uses: actions/checkout@v4
170170
with:
171171
ref: ${{ needs.release_create.outputs.new_sha }}
172172

173173
- name: Set up Python 3.9
174-
uses: actions/setup-python@v2
174+
uses: actions/setup-python@v5
175175
with:
176-
python-version: 3.9
176+
python-version: "3.9"
177177

178178
- name: Build
179179
run: |

.github/workflows/update_protobufs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77

88
steps:
99
- name: Checkout code
10-
uses: actions/checkout@v2
10+
uses: actions/checkout@v4
1111
with:
1212
submodules: true
1313

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ __pycache__
1616
examples/__pycache__
1717
meshtastic.spec
1818
.hypothesis/
19+
coverage.xml

bin/run-ci-local.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
# This script lets you run github ci actions locally
4+
5+
# also: we only run one of the 4 matrix tests, because otherwise it absolutely hammers the CPU (so many containers and threads)
6+
act -P ubuntu-latest=-self-hosted --matrix "python-version:3.8"

0 commit comments

Comments
 (0)