-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.8 KB
/
Copy pathci.yml
File metadata and controls
63 lines (52 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: CI
# CI proporzionata al diff SyncBay (ADR 0004). La corsia docs-only mantiene un
# check conclusivo leggero; la corsia runtime esegue solo i gate dedotti dal
# diff. Browser, provider live e audit completi restano controlli espliciti.
on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
verify:
name: Verifica proporzionata
runs-on: ubuntu-latest
timeout-minutes: 8
steps:
- uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Classifica il diff
id: lane
env:
BASE_REF: ${{ github.base_ref }}
EVENT_NAME: ${{ github.event_name }}
run: |
set -euo pipefail
if [ "$EVENT_NAME" = "pull_request" ] && [ -n "$BASE_REF" ]; then
base="origin/$BASE_REF"
else
base="origin/main"
fi
echo "base=$base" >> "$GITHUB_OUTPUT"
node scripts/syncbay-verify.mjs classify --base "$base" >> "$GITHUB_OUTPUT"
- name: Setup Node
uses: actions/setup-node@v7
with:
node-version-file: .node-version
cache: npm
- name: Setup npm
run: npm install --global npm@12.0.2
- name: Install dipendenze deterministico
run: npm ci
# Nessun gate condizionato alla corsia qui: la corsia la sceglie
# `verify:changed`, che per i diff docs-only esegue `format:check`,
# `doctor` e `git diff --check`. La classificazione resta diagnostica.
- name: Verifica i gate pertinenti al diff
run: npm run verify:changed -- --base "${{ steps.lane.outputs.base }}" --ci --no-receipt --without-ui-gates