Skip to content

Commit 4ecfb41

Browse files
Merge pull request #1 from FrontierDevelopmentLab/clean/cicd
Clean/cicd
2 parents 3c0a468 + e4bd253 commit 4ecfb41

15 files changed

Lines changed: 3224 additions & 412 deletions

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
on: push
2+
jobs:
3+
test:
4+
strategy:
5+
matrix:
6+
python-version: ['3.11', '3.12', '3.13', '3.14']
7+
defaults:
8+
run:
9+
shell: bash
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: Set up Python ${{ matrix.python-version }}
14+
uses: actions/setup-python@v5
15+
with:
16+
python-version: ${{ matrix.python-version }}
17+
- name: Install Poetry
18+
uses: snok/install-poetry@v1
19+
with:
20+
virtualenvs-create: true
21+
virtualenvs-in-project: true
22+
installer-parallel: true
23+
- name: Cache Poetry dependencies
24+
uses: actions/cache@v4
25+
with:
26+
path: .venv
27+
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }}
28+
restore-keys: |
29+
venv-${{ runner.os }}-${{ matrix.python-version }}-
30+
- name: Install dependencies
31+
run: |
32+
poetry install --no-interaction
33+
- name: Running pre-commit
34+
uses: pre-commit/action@v3.0.1

.pre-commit-config.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: detect-secrets
5+
name: Detect secrets
6+
language: system
7+
entry: poetry run detect-secrets-hook
8+
args: ['--baseline', '.secrets.baseline']
9+
exclude: '\.ipynb$'
10+
- id: autoflake
11+
name: autoflake
12+
language: system
13+
"types": [python]
14+
require_serial: true
15+
entry: poetry run autoflake
16+
args:
17+
- "--in-place"
18+
- "--remove-unused-variables"
19+
- "--recursive"
20+
- id: black
21+
name: black
22+
entry: poetry run black .
23+
language: system
24+
types: [python]
25+
- id: isort
26+
name: isort
27+
entry: poetry run isort .
28+
language: system
29+
exclude: |
30+
(?x)^(
31+
.+\.js$|
32+
.+\.jsx$|
33+
.+\.css$|
34+
.+\.html$|
35+
.+\.json$|
36+
.+\.md$
37+
)$
38+
- id: mypy
39+
name: mypy
40+
entry: poetry run mypy src tests
41+
pass_filenames: false
42+
language: system
43+
args:
44+
- "--ignore-missing-imports"
45+
- "--warn-unused-ignores"
46+
- id: pylint
47+
name: pylint
48+
entry: poetry run pylint src tests
49+
pass_filenames: false
50+
language: system
51+
args:
52+
- "--enable-useless-suppression"
53+
- id: pytest-with-coverage
54+
name: Run pytest with coverage
55+
entry: poetry run coverage run -m pytest --testdox tests
56+
language: system
57+
pass_filenames: false
58+
always_run: true
59+
- id: coverage-report
60+
name: Coverage report
61+
entry: poetry run coverage report
62+
language: system
63+
pass_filenames: false
64+
verbose: true
65+
args:
66+
- "--fail-under=100"
67+
- "--skip-empty"
68+
- "--skip-covered"
69+
- "--show-missing"
70+
- id: sphinx-docs
71+
name: Build Sphinx docs
72+
entry: bash -c 'command -v sphinx-build >/dev/null 2>&1 && poetry run sphinx-build -b html src/eve_api/docs _build/html/eve_api || echo "sphinx-build not found, skipping"'
73+
language: system
74+
pass_filenames: false
75+
always_run: true

0 commit comments

Comments
 (0)