Update CI/CD workflow for modular code structure: update test targets, linting targets, coverage modules, and add Pelican Panel test keys
CI/CD Pipeline / Unit Tests (Python 3.11) (push) Successful in 40s
CI/CD Pipeline / Unit Tests (Python 3.12) (push) Successful in 40s
CI/CD Pipeline / Unit Tests (Python 3.13) (push) Successful in 43s
CI/CD Pipeline / Code Quality & Linting (push) Successful in 25s
CI/CD Pipeline / Security Scanning (push) Successful in 38s
CI/CD Pipeline / Integration Tests (push) Successful in 32s
CI/CD Pipeline / Generate Test Report (push) Successful in 4s
CI/CD Pipeline / Build Docker Image (push) Successful in 27s
CI/CD Pipeline / CI/CD Pipeline Status (push) Successful in 1s
CI/CD Pipeline / Unit Tests (Python 3.11) (push) Successful in 40s
CI/CD Pipeline / Unit Tests (Python 3.12) (push) Successful in 40s
CI/CD Pipeline / Unit Tests (Python 3.13) (push) Successful in 43s
CI/CD Pipeline / Code Quality & Linting (push) Successful in 25s
CI/CD Pipeline / Security Scanning (push) Successful in 38s
CI/CD Pipeline / Integration Tests (push) Successful in 32s
CI/CD Pipeline / Generate Test Report (push) Successful in 4s
CI/CD Pipeline / Build Docker Image (push) Successful in 27s
CI/CD Pipeline / CI/CD Pipeline Status (push) Successful in 1s
This commit is contained in:
1 parent
346e6d9604
commit
0adc7f44e8
1 file changed
+19
-8
@@ -70,6 +70,9 @@ jobs:
|
||||
PanelURL = https://panel.example.com
|
||||
ClientAPIKey = ptlc_test_client_key_123456789
|
||||
ApplicationAPIKey = ptla_test_app_key_987654321
|
||||
# Pelican Panel test keys
|
||||
# ClientAPIKey = pacc_test_client_key_123456789
|
||||
# ApplicationAPIKey = papp_test_app_key_987654321
|
||||
|
||||
[Discord]
|
||||
Token = test_discord_token_placeholder
|
||||
@@ -81,8 +84,13 @@ jobs:
|
||||
python -m pytest test_pterodisbot.py \
|
||||
-v \
|
||||
--tb=short \
|
||||
--cov=pterodisbot \
|
||||
--cov=server_metrics_graphs \
|
||||
--cov=config \
|
||||
--cov=api \
|
||||
--cov=embeds \
|
||||
--cov=views \
|
||||
--cov=bot \
|
||||
--cov=metrics \
|
||||
--cov=models \
|
||||
--cov-report=xml \
|
||||
--cov-report=term \
|
||||
--cov-report=html \
|
||||
@@ -129,7 +137,7 @@ jobs:
|
||||
|
||||
- name: Run flake8
|
||||
run: |
|
||||
flake8 pterodisbot.py server_metrics_graphs.py \
|
||||
flake8 config.py api.py embeds.py views.py bot.py metrics.py models.py \
|
||||
--max-line-length=140 \
|
||||
--ignore=E501,W503,E203 \
|
||||
--exclude=venv,__pycache__,build,dist \
|
||||
@@ -139,7 +147,7 @@ jobs:
|
||||
|
||||
- name: Run pylint
|
||||
run: |
|
||||
pylint pterodisbot.py server_metrics_graphs.py \
|
||||
pylint config.py api.py embeds.py views.py bot.py metrics.py models.py \
|
||||
--disable=C0111,C0103,R0913,R0914,R0915,W0718 \
|
||||
--max-line-length=140 \
|
||||
--output-format=text \
|
||||
@@ -148,17 +156,17 @@ jobs:
|
||||
|
||||
- name: Check code formatting with black
|
||||
run: |
|
||||
black --check --line-length=140 --diff pterodisbot.py server_metrics_graphs.py | tee black-report.txt
|
||||
black --check --line-length=140 --diff config.py api.py embeds.py views.py bot.py metrics.py models.py | tee black-report.txt
|
||||
continue-on-error: true
|
||||
|
||||
- name: Check import ordering
|
||||
run: |
|
||||
isort --check-only --profile black --line-length=140 pterodisbot.py server_metrics_graphs.py
|
||||
isort --check-only --profile black --line-length=140 config.py api.py embeds.py views.py bot.py metrics.py models.py
|
||||
continue-on-error: true
|
||||
|
||||
- name: Type checking with mypy
|
||||
run: |
|
||||
mypy pterodisbot.py server_metrics_graphs.py --ignore-missing-imports > mypy-report.txt || true
|
||||
mypy config.py api.py embeds.py views.py bot.py metrics.py models.py --ignore-missing-imports > mypy-report.txt || true
|
||||
continue-on-error: true
|
||||
|
||||
- name: Upload linting reports
|
||||
@@ -203,7 +211,7 @@ jobs:
|
||||
|
||||
- name: Run bandit security scan
|
||||
run: |
|
||||
bandit -r . \
|
||||
bandit -r config.py api.py embeds.py views.py bot.py metrics.py models.py \
|
||||
-f json \
|
||||
-o bandit-report.json \
|
||||
-ll \
|
||||
@@ -273,6 +281,9 @@ jobs:
|
||||
PanelURL = https://panel.example.com
|
||||
ClientAPIKey = ptlc_test_client_key_123456789
|
||||
ApplicationAPIKey = ptla_test_app_key_987654321
|
||||
# Pelican Panel test keys
|
||||
# ClientAPIKey = pacc_test_client_key_123456789
|
||||
# ApplicationAPIKey = papp_test_app_key_987654321
|
||||
|
||||
[Discord]
|
||||
Token = test_discord_token_placeholder
|
||||
|
||||
Reference in new issue
Block a user