mirror of
https://github.com/gradenGnostic/LegacyLauncher.git
synced 2026-05-01 19:41:25 +00:00
43 lines
946 B
YAML
43 lines
946 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["main", "dev"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
jobs:
|
|
lint-and-build:
|
|
name: Lint & Smoke Test
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: "npm"
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Check for syntax errors
|
|
run: node --check main.js
|
|
|
|
- name: Verify package.json scripts exist
|
|
run: |
|
|
node -e "
|
|
const pkg = require('./package.json');
|
|
const required = ['start', 'dist'];
|
|
for (const s of required) {
|
|
if (!pkg.scripts?.[s]) {
|
|
console.error('Missing script:', s);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
console.log('All required scripts present.');
|
|
"
|