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

This commit is contained in:
k.eaven committed 2026-10-24 13:08:52 +00:00
1 parent 346e6d9604
commit 0adc7f44e8
1 file changed
+19 -8
+19 -8
View File
@@ -70,6 +70,9 @@ jobs:
PanelURL = https://panel.example.com PanelURL = https://panel.example.com
ClientAPIKey = ptlc_test_client_key_123456789 ClientAPIKey = ptlc_test_client_key_123456789
ApplicationAPIKey = ptla_test_app_key_987654321 ApplicationAPIKey = ptla_test_app_key_987654321
# Pelican Panel test keys
# ClientAPIKey = pacc_test_client_key_123456789
# ApplicationAPIKey = papp_test_app_key_987654321
[Discord] [Discord]
Token = test_discord_token_placeholder Token = test_discord_token_placeholder
@@ -81,8 +84,13 @@ jobs:
python -m pytest test_pterodisbot.py \ python -m pytest test_pterodisbot.py \
-v \ -v \
--tb=short \ --tb=short \
--cov=pterodisbot \ --cov=config \
--cov=server_metrics_graphs \ --cov=api \
--cov=embeds \
--cov=views \
--cov=bot \
--cov=metrics \
--cov=models \
--cov-report=xml \ --cov-report=xml \
--cov-report=term \ --cov-report=term \
--cov-report=html \ --cov-report=html \
@@ -129,7 +137,7 @@ jobs:
- name: Run flake8 - name: Run flake8
run: | 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 \ --max-line-length=140 \
--ignore=E501,W503,E203 \ --ignore=E501,W503,E203 \
--exclude=venv,__pycache__,build,dist \ --exclude=venv,__pycache__,build,dist \
@@ -139,7 +147,7 @@ jobs:
- name: Run pylint - name: Run pylint
run: | 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 \ --disable=C0111,C0103,R0913,R0914,R0915,W0718 \
--max-line-length=140 \ --max-line-length=140 \
--output-format=text \ --output-format=text \
@@ -148,17 +156,17 @@ jobs:
- name: Check code formatting with black - name: Check code formatting with black
run: | 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 continue-on-error: true
- name: Check import ordering - name: Check import ordering
run: | 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 continue-on-error: true
- name: Type checking with mypy - name: Type checking with mypy
run: | 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 continue-on-error: true
- name: Upload linting reports - name: Upload linting reports
@@ -203,7 +211,7 @@ jobs:
- name: Run bandit security scan - name: Run bandit security scan
run: | run: |
bandit -r . \ bandit -r config.py api.py embeds.py views.py bot.py metrics.py models.py \
-f json \ -f json \
-o bandit-report.json \ -o bandit-report.json \
-ll \ -ll \
@@ -273,6 +281,9 @@ jobs:
PanelURL = https://panel.example.com PanelURL = https://panel.example.com
ClientAPIKey = ptlc_test_client_key_123456789 ClientAPIKey = ptlc_test_client_key_123456789
ApplicationAPIKey = ptla_test_app_key_987654321 ApplicationAPIKey = ptla_test_app_key_987654321
# Pelican Panel test keys
# ClientAPIKey = pacc_test_client_key_123456789
# ApplicationAPIKey = papp_test_app_key_987654321
[Discord] [Discord]
Token = test_discord_token_placeholder Token = test_discord_token_placeholder