-
Notifications
You must be signed in to change notification settings - Fork 5
62 lines (50 loc) · 1.46 KB
/
python-ci.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
name: Running Python CI jobs
on:
push:
paths:
- 'pyrav4l2/**'
- 'README.md'
pull_request:
paths:
- 'pyrav4l2/**'
- 'README.md'
workflow_dispatch:
jobs:
lint-with-yapf:
runs-on: ubuntu-latest
steps:
- name: Get repository
uses: actions/checkout@v3
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install .
pip install yapf pytest pytest-cov
- name: Lint with yapf
run: |
./.github/check_code_formatting.sh
run-example-scripts-from-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install tuttest
run: pip install git+https://github.com/antmicro/tuttest.git
- name: Extract example scripts from README
run: python ./.github/save_examples.py README.md
- name: Copy examples and pyrav4l2 to shared-dir
run: |
mkdir -p tests/pyrav4l2
cp -r ./pyrav4l2 setup.py ./tests/pyrav4l2
cp -r ./examples ./tests
- name: Run scripts in Renode
uses: antmicro/renode-linux-runner-action@v1
with:
shared-dirs: ./tests
renode-run: |
pip install ./pyrav4l2
for script in ./examples/*.py; do python $script; done
devices: vivid