Files
pulse/.github/workflows/node-ci.yml
T
2025-04-30 17:15:36 +01:00

40 lines
1.3 KiB
YAML

name: Node.js CI
on:
push:
branches: [ "main" ] # Adjust if your main branch has a different name
pull_request:
branches: [ "main" ] # Adjust if your main branch has a different name
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x] # Use Node.js LTS version 20
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Clean install dependencies
run: rm -rf node_modules && npm ci # Use ci for faster, more reliable installs in CI
- name: Run tests with cache clearing # Changed step name for clarity
env: # Add environment variables from GitHub secrets
PROXMOX_HOST: ${{ secrets.PROXMOX_HOST }}
PROXMOX_TOKEN_ID: ${{ secrets.PROXMOX_TOKEN_ID }}
PROXMOX_TOKEN_SECRET: ${{ secrets.PROXMOX_TOKEN_SECRET }}
# PBS_HOST: ${{ secrets.PBS_HOST }}
# PBS_TOKEN_ID: ${{ secrets.PBS_TOKEN_ID }}
# PBS_TOKEN_SECRET: ${{ secrets.PBS_TOKEN_SECRET }}
# Simplified test command
run: npm test