mirror of
https://github.com/abap2UI5/abap2UI5.git
synced 2025-04-29 16:23:06 +08:00
38 lines
782 B
YAML
38 lines
782 B
YAML
name: Node.js CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18' # Use Node.js version >= 18
|
|
cache: 'npm'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Run npm audit fix (optional, to fix vulnerabilities)
|
|
run: npm audit fix || echo "Some issues require manual fixing."
|
|
|
|
- name: Lint and build
|
|
run: |
|
|
npm run lint # Ensure this script exists in your package.json
|
|
npm run build # Ensure this script exists in your package.json
|
|
|
|
- name: Run tests
|
|
run: npm test
|