Opt CI and guarded publishing workflows into Node.js 24 before GitHub changes the default runner behavior. Constraint: GitHub Actions defaults switch to Node.js 24 on June 16, 2026 Confidence: high Scope-risk: narrow Tested: Workflow YAML parsing; 221 pytest tests; Python compilation; JavaScript syntax; diff check
65 lines
1.4 KiB
YAML
65 lines
1.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
env:
|
|
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
|
|
|
|
jobs:
|
|
test:
|
|
name: Test on Python ${{ matrix.python-version }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version:
|
|
- "3.10"
|
|
- "3.12"
|
|
|
|
steps:
|
|
- name: Check out repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
cache: pip
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "22"
|
|
|
|
- name: Install dependencies
|
|
run: python -m pip install --upgrade pip && python -m pip install -e ".[test]"
|
|
|
|
- name: Run tests
|
|
run: python -m pytest -q
|
|
|
|
- name: Compile Python
|
|
run: python -m compileall -q .
|
|
|
|
- name: Check frontend JavaScript
|
|
run: node --check js/mediahub.js
|
|
|
|
- name: Validate workflow JSON
|
|
run: |
|
|
for file in examples/*.json tests/fixtures/*.json; do
|
|
python -m json.tool "$file" >/dev/null
|
|
done
|
|
|
|
- name: Check tracked files for committed credentials
|
|
run: |
|
|
if git ls-files | grep -E '(^|/)(\.api_env|\.env|credentials|secrets?)(\.|$)'; then
|
|
echo "A credential-like file is tracked."
|
|
exit 1
|
|
fi
|