ci: standardize CI/CD workflows and add Renovate
- CI: single sequential job, local-ubuntu-latest runner, Node 22, workflow_call trigger, npm run commands - Release: CI gate via reusable workflow, concurrency protection, dynamic package name, tarball validation, gh CLI - Delete test-runner.yaml (one-time runner diagnostic) - Add renovate.json with recommended config Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+11
-21
@@ -5,9 +5,10 @@ on:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_call:
|
||||
|
||||
jobs:
|
||||
lint-and-test:
|
||||
ci:
|
||||
runs-on: local-ubuntu-latest
|
||||
timeout-minutes: 10
|
||||
|
||||
@@ -18,34 +19,23 @@ jobs:
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
node-version: '22'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Type-check
|
||||
run: npm run tsc
|
||||
- name: Build plugin
|
||||
run: npx @kinvolk/headlamp-plugin build
|
||||
|
||||
- name: Lint
|
||||
run: npm run lint
|
||||
|
||||
- name: Build plugin
|
||||
run: npx @kinvolk/headlamp-plugin build
|
||||
- name: Type-check
|
||||
run: npm run tsc
|
||||
|
||||
- name: Verify build artifacts
|
||||
run: |
|
||||
if [ ! -d "dist" ] || [ -z "$(ls -A dist)" ]; then
|
||||
echo "::error::dist directory is empty or missing"
|
||||
exit 1
|
||||
fi
|
||||
echo "Build artifacts verified"
|
||||
ls -lh dist/
|
||||
- name: Format check
|
||||
run: npm run format:check
|
||||
|
||||
- name: Upload build artifact (for inspection)
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: plugin-dist
|
||||
path: dist/
|
||||
retention-days: 7
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
|
||||
Reference in New Issue
Block a user