File tree Expand file tree Collapse file tree 7 files changed +102
-3
lines changed
Expand file tree Collapse file tree 7 files changed +102
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : Code Quality
3+
4+ on :
5+ push :
6+ branches : ["main"]
7+ pull_request :
8+ branches : ["main"]
9+
10+ jobs :
11+ build :
12+ runs-on : ubuntu-latest
13+ container : python:3.10-slim
14+ steps :
15+ - name : Checkout
16+ uses : actions/checkout@v4
17+
18+ - name : Install system dependencies
19+ run : |
20+ apt-get update
21+ apt-get install -y git build-essential
22+
23+ - name : Install dependencies
24+ run : |
25+ python -m pip install --upgrade pip
26+ pip install -r requirements-dev.txt
27+
28+ - name : Lint with ruff
29+ run : ruff check --output-format=github --line-length 79
30+
31+ - name : Run mypy
32+ run : |
33+ mypy \
34+ --ignore-missing-imports \
35+ --disallow-untyped-defs \
36+ --strict-optional \
37+ --warn-unused-ignores \
38+ --disable-error-code type-arg \
39+ .
40+
41+ - name : YAML Lint
42+ run : yamllint --strict .
Original file line number Diff line number Diff line change 1+ ---
2+ name : Tests
3+
4+ on :
5+ workflow_run :
6+ workflows : ["Code Quality"]
7+ types :
8+ - completed
9+
10+ jobs :
11+ run_tests_if_successful_build :
12+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
13+ runs-on : ubuntu-latest
14+ strategy :
15+ matrix :
16+ python :
17+ - version : " 3.10"
18+ image : " python:3.10-slim"
19+ - version : " 3.11"
20+ image : " python:3.11-slim"
21+ - version : " 3.12"
22+ image : " python:3.12-slim"
23+ container :
24+ image : ${{ matrix.python.image }}
25+
26+ steps :
27+ - name : Checkout
28+ uses : actions/checkout@v4
29+
30+ - name : Install system dependencies
31+ run : |
32+ apt-get update
33+ apt-get install -y git build-essential
34+
35+ - name : Install dependencies
36+ run : |
37+ python -m pip install --upgrade pip
38+ pip install -r requirements-dev.txt
39+
40+ - name : Run tests with coverage
41+ run : |
42+ coverage run -m pytest --maxfail=2 --disable-warnings tests/
43+ coverage report
Original file line number Diff line number Diff line change 3030 hooks :
3131 - id : yamllint
3232 args : ["--strict"]
33- exclude : ^\.github/workflows/
33+ - repo : https://github.com/rhysd/actionlint
34+ rev : v1.7.7
35+ hooks :
36+ - id : actionlint
Original file line number Diff line number Diff line change 1+ ---
2+ extends : default
3+
4+ ignore : |
5+ .*/*
6+ venv/*
Original file line number Diff line number Diff line change 11git+https://github.com/pavelacamposp/direct_data_driven_mpc.git
22genesis_world == 0.2.1
3- numpy == 2.2 .4
3+ numpy >= 1.26 .4
44torch == 2.6.0
55pre-commit
66ruff
77mypy
8+ yamllint
9+ pytest
10+ coverage
Original file line number Diff line number Diff line change 11git+https://github.com/pavelacamposp/direct_data_driven_mpc.git
22genesis_world == 0.2.1
3- numpy == 2.2 .4
3+ numpy >= 1.26 .4
44torch == 2.6.0
Original file line number Diff line number Diff line change 1+ def test_placeholder () -> None :
2+ assert True
You can’t perform that action at this time.
0 commit comments