This repository was archived by the owner on May 10, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
135 lines (115 loc) · 3.73 KB
/
Copy pathintegration.yaml
File metadata and controls
135 lines (115 loc) · 3.73 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
name: Integration Tests
on:
workflow_call:
inputs:
os:
description: OS to use during integration tests
required: true
type: string
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup Node
uses: actions/setup-node@v4.0.1
with:
node-version: 20
cache: npm
- name: Install Dependencies
run: npm ci --ignore-scripts
- name: Format
run: npm run format
- name: Lint
run: npm run lint
- name: Test
run: npm run test
- name: Build
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v4.4.0
with:
name: build-artifacts
path: |
dist
integration_test:
name: Integration Tests
needs: build
runs-on: ${{ inputs.os }}
env:
CI: true
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Download build artifacts
uses: actions/download-artifact@v4.1.8
with:
name: build-artifacts
path: |
dist
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4.0.1
- name: Install CLI dependencies
shell: bash
env:
HUSKY: 0
run: |
ls -la
rm package-lock.json
npm pkg delete scripts.prepare
npm install --omit=dev --ignore-scripts
npm install -g . --omit=dev --ignore-scripts
- name: Run tests
shell: bash
run: |
nrg -h
nrg --help
nrg -v
nrg --version
nrg create -h
nrg create --help
nrg create node -h
nrg create node --help
nrg create -n test-project-1 --node-name node-1 --node-category custom-nodes --node-color "#FFFFFF" --node-inputs 1 --node-outputs 1
cd test-project-1
npm install
npm ls @allanoricil/nrg-nodes
npm ls @allanoricil/nrg-core
npm ls @allanoricil/nrg-generator
nrg create node -n node-2 --node-category custom-nodes --node-color "#FFFFFF" --node-inputs 1 --node-outputs 1
./node_modules/.bin/nrg -h
./node_modules/.bin/nrg --help
./node_modules/.bin/nrg -v
./node_modules/.bin/nrg --version
./node_modules/.bin/nrg create -h
./node_modules/.bin/nrg create --help
./node_modules/.bin/nrg create node -h
./node_modules/.bin/nrg create node --help
./node_modules/.bin/nrg create node -n node-3 --node-category custom-nodes --node-color "#FFFFFF" --node-inputs 1 --node-outputs 1
./node_modules/.bin/nrg create node --node-name node-4 --node-category custom-nodes --node-color "#FFFFFF" --node-inputs 1 --node-outputs 1
nrg create node -n node-5 --node-category custom-nodes --node-color "#FFFFFF" --node-inputs 1 --node-outputs 1
nrg create node --node-name node-6 --node-category custom-nodes --node-color "#FFFFFF" --node-inputs 1 --node-outputs 1
npm run build
npm run build:dev
npm run start & echo $! > nrg.pid
sleep 20
kill $(cat nrg.pid)
rm nrg.pid
nrg build
nrg build -e dev
nrg dev -o & echo $! > nrg.pid
sleep 20
kill $(cat nrg.pid)
rm nrg.pid
sleep 30
- name: Upload nrg logs
uses: actions/upload-artifact@v4.4.0
with:
name: nrg-logs-${{ inputs.os }}-${{ matrix.node-version }}
path: |
.nrg/nrg.log