mirror of
https://github.com/gradenGnostic/LegacyLauncher.git
synced 2026-04-26 17:08:03 +00:00
Add CI workflow for linting and smoke testing
This commit is contained in:
parent
aff0d329ba
commit
98eeffc461
42
.github/workflows/ci.yml
vendored
Normal file
42
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
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.');
|
||||
"
|
||||
Loading…
Reference in a new issue