-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (33 loc) · 930 Bytes
/
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
name: Python CI
on:
push:
branches:
- '**' # Triggers on push to any branch
pull_request:
branches:
- '**' # Triggers on PR creation, updates, or reopening against any branch
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12.2'
- name: Install dependencies
run: |
pip install -r software/python/requirements.txt
- name: Install linters and formatters
run: |
pip install black==24.10.0 flake8==7.0.0
- name: Run Black formatter
run: |
cd software/python
black --check --skip-magic-trailing-comma .
- name: Run tests
run: |
cd software/python
pip install pytest==8.1.1 pytest-cov==5.0.0
python3 -m pytest -v --cov --disable-warnings tests/
flake8 --statistics