-
-
Notifications
You must be signed in to change notification settings - Fork 180
78 lines (65 loc) · 2.48 KB
/
Copy pathci.yml
File metadata and controls
78 lines (65 loc) · 2.48 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
name: CI
on:
push:
branches: [ main, 'release/**' ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
# Legacy environment name: holds the N8N cloud credentials used by the live
# regression tests. Rename to `ci` some day by recreating it and re-adding
# the secrets (they cannot be copied programmatically).
environment: next
env:
GITHUB_TOKEN: ${{ github.token }}
N8N_HOST: ${{ vars.N8N_HOST }}
N8N_API_KEY: ${{ secrets.N8N_API_KEY }}
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
# cache: 'npm' removed because package-lock.json is gitignored
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10
- name: Install dependencies
run: npm install
- name: Check dependency alignment
run: npm run check:deps
- name: Resolve n8n stable tag
id: n8n-tag
run: echo "tag=$(node scripts/ensure-n8n-cache.cjs --print-tag)" >> "$GITHUB_OUTPUT"
- name: Cache n8n repository
uses: actions/cache@v4
with:
path: .n8n-cache
key: ${{ runner.os }}-n8n-cache-${{ steps.n8n-tag.outputs.tag }}-${{ hashFiles('scripts/ensure-n8n-cache.cjs') }}
restore-keys: |
${{ runner.os }}-n8n-cache-
- name: Build all packages
run: npm run build
- name: Build skill adapters
run: npm run build:adapters --workspace=packages/skills
- name: Verify committed generated skills are up to date
run: |
for file in \
skills/README.md \
skills/n8n-architect/SKILL.md \
plugins/claude/n8n-as-code/skills/n8n-architect/SKILL.md \
plugins/openclaw/n8n-as-code/skills/n8n-architect/SKILL.md \
plugins/cursor/n8n-as-code/skills/n8n-architect/SKILL.md
do
if ! git diff --quiet --exit-code -- "$file"; then
echo "Error: $file was modified by the skill adapters build."
echo 'Please run "npm run build && npm run build:adapters --workspace=packages/skills" from the workspace root and commit the updated generated skill file.'
exit 1
fi
done
npm run check:adapters --workspace=packages/skills
echo 'Committed generated skill files match the current SSOT.'
- name: Run tests
run: npm test