Skip to content

Commit 3f2dd64

Browse files
ci: improve linter, add PR checks, and match RocketPy stack
1 parent e028d00 commit 3f2dd64

3 files changed

Lines changed: 46 additions & 30 deletions

File tree

.github/workflows/linter.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/linters.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Linters
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
pull_request:
9+
types: [opened, synchronize, reopened, ready_for_review]
10+
paths:
11+
- "**.py"
12+
- "**.ipynb"
13+
- ".github/**"
14+
- "pyproject.toml"
15+
- "requirements*"
16+
- ".pylintrc"
17+
- "Makefile"
18+
19+
jobs:
20+
lint:
21+
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
python-version: ["3.10"]
25+
steps:
26+
- uses: actions/checkout@main
27+
- name: Set up Python ${{ matrix.python-version }}
28+
uses: actions/setup-python@main
29+
with:
30+
python-version: ${{ matrix.python-version }}
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip
34+
pip install ruff pylint pytest
35+
pip install -r requirements.in
36+
- name: Ruff (lint)
37+
run: ruff check --output-format=github .
38+
- name: Ruff (format)
39+
run: ruff format --check .
40+
- name: Pylint
41+
run: |
42+
pylint examples/ rocketserializer/ tests/

.github/workflows/test-pytest.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: pytest
22

33
on:
4+
push:
5+
branches:
6+
- master
7+
- main
48
pull_request:
59
types: [opened, synchronize, reopened, ready_for_review]
610
paths:

0 commit comments

Comments
 (0)