name: Quick Validation
on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
quick-checks:
name: Quick Validation Checks
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install minimal dependencies
run: |
python -m pip install --upgrade pip
pip install ruff==0.12.9
# Install core dependencies for import validation
pip install mcp[cli]>=1.10.0 simplenote>=2.1.4 requests>=2.32.4
- name: Quick syntax check
run: |
echo "π Running quick syntax validation..."
ruff check --select=F,E9 . --output-format=github
echo "β
Syntax check passed"
- name: Import validation
run: |
echo "π¦ Testing core package imports..."
python -c "
import sys
sys.path.insert(0, '.')
try:
import simplenote_mcp
print('β
Main package imports successfully')
except ImportError as e:
print(f'β Import failed: {e}')
sys.exit(1)
except Exception as e:
print(f'β οΈ Import warning: {e}')
try:
from simplenote_mcp.server import server
print('β
Server module imports successfully')
except ImportError as e:
print(f'β Server import failed: {e}')
sys.exit(1)
except Exception as e:
print(f'β οΈ Server import warning: {e}')
"
- name: Critical file check
run: |
echo "π Checking critical files..."
required_files=(
"simplenote_mcp/__init__.py"
"simplenote_mcp/server/server.py"
"pyproject.toml"
)
for file in "${required_files[@]}"; do
if [ -f "$file" ]; then
echo "β
$file exists"
else
echo "β $file missing"
exit 1
fi
done
- name: Quick PR validation
if: github.event_name == 'pull_request'
run: |
echo "π PR Quick Validation Summary"
echo "==============================="
echo "PR Number: ${{ github.event.number }}"
echo "Base Branch: ${{ github.base_ref }}"
echo "Head Branch: ${{ github.head_ref }}"
echo "Changed Files:"
git diff --name-only origin/${{ github.base_ref }}...HEAD | head -10
echo "β
Quick validation completed successfully"
- name: Quick security scan
run: |
echo "π Running quick security pre-check..."
ruff check --select=S102,S106,S107,S108 . --output-format=github || echo "β οΈ Security warnings found (non-blocking)"
echo "β
Security pre-check completed"
- name: Set validation status
if: success()
run: |
echo "π Quick validation passed! Full CI/CD pipeline will run next."
echo "validation=success" >> $GITHUB_ENV
- name: Comment on PR with quick results
if: github.event_name == 'pull_request' && success() && github.actor != 'dependabot[bot]'
uses: actions/github-script@v7
with:
script: |
const comment = `## β‘ Quick Validation Results
β
**All quick checks passed!**
- Syntax validation: β
Passed
- Import validation: β
Passed
- Critical files: β
Present
The full CI/CD pipeline is now running. This PR looks good for initial review!`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment
});