parent
c46f2f2fc3
commit
6c7facadce
1831 changed files with 477243 additions and 2607 deletions
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
|
|
@ -13,38 +13,24 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
python-version: '3.11'
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements.txt
|
||||
run: npm ci
|
||||
|
||||
- name: Syntax check
|
||||
run: |
|
||||
python3 -c "
|
||||
import ast, sys, pathlib
|
||||
errors = []
|
||||
for f in pathlib.Path('app').rglob('*.py'):
|
||||
try:
|
||||
ast.parse(f.read_text())
|
||||
except SyntaxError as e:
|
||||
errors.append(f'{f}: {e}')
|
||||
if errors:
|
||||
for e in errors: print('SYNTAX ERROR:', e)
|
||||
sys.exit(1)
|
||||
files = list(pathlib.Path('app').rglob('*.py'))
|
||||
print(f'All {len(files)} Python files OK')
|
||||
"
|
||||
run: node --check src/app.js src/server.js src/db.js src/eventsub.js src/dispatch.js src/ws.js src/cooldowns.js src/routers/*.js
|
||||
|
||||
- name: Import check
|
||||
run: python -c "from app.main import app; print('App import OK')"
|
||||
run: node -e "require('./src/app')"
|
||||
env:
|
||||
DATABASE_URL: sqlite:///./test.db
|
||||
SECRET_KEY: ci-test-secret-not-real
|
||||
TWITCH_CLIENT_ID: ci-placeholder
|
||||
TWITCH_CLIENT_SECRET: ci-placeholder
|
||||
TWITCH_REDIRECT_URI: http://localhost:8000/auth/callback
|
||||
APP_BASE_URL: http://localhost:8000
|
||||
TWITCH_REDIRECT_URI: http://localhost:3000/auth/callback
|
||||
SECRET_KEY: ci-test-secret-not-real
|
||||
APP_BASE_URL: http://localhost:3000
|
||||
DB_PATH: ./test.db
|
||||
PORT: 3000
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue