Files
shared-actions/.gitea/workflows/quality-gates.yml
T
LucaZanni 3b49d18d5b fix(ci): aggiunge input npm-version per compatibilità lockfile npm@11
- quality-gates.yml: nuovo input npm-version con step condizionale upgrade
- docker-release.yml: idem
- examples/documentazione: ci.yml e release.yml passano npm-version: '11'

Fixes #2 @25m
2026-06-06 13:36:22 +02:00

65 lines
1.6 KiB
YAML

name: Quality Gates
on:
workflow_call:
inputs:
node-version:
type: string
default: '22.17'
npm-version:
type: string
default: ''
jobs:
quality-gates:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: https://gitea.com/actions/checkout@v6
- name: Setup Node.js
uses: https://gitea.com/actions/setup-node@v4
with:
node-version: ${{ inputs.node-version || '22.17' }}
- name: Upgrade npm
if: inputs.npm-version != ''
run: npm install -g npm@${{ inputs.npm-version }}
- name: Cache npm
uses: https://gitea.com/actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Configure npm private registry
run: |
echo "@pzeta:registry=https://gitea.pzetatouch.it/api/packages/pzeta_touch/npm/" >> ~/.npmrc
echo "//gitea.pzetatouch.it/api/packages/pzeta_touch/npm/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
- name: Check outdated packages
run: npm outdated || true
- name: Install dependencies
run: npm ci
- name: Security audit
run: npm audit --audit-level=high || true
- name: Lint
run: npm run lint:check
- name: Type check
run: npm run typecheck
- name: Format check
run: npm run format:check
- name: Build
run: npm run build
- name: Test
run: npm run test