Skip to content

Commit

Permalink
fix: basedir=/bin SyntaxError: missing ) after argument list
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOricil committed Sep 29, 2024
1 parent 56851ae commit 303309c
Show file tree
Hide file tree
Showing 7 changed files with 181 additions and 171 deletions.
158 changes: 0 additions & 158 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,161 +40,3 @@ jobs:
name: build-artifacts
path: |
dist
integration_test:
name: Integration Tests - Ubuntu/MacOS
needs: build
runs-on: ${{ matrix.os }}
env:
CI: true
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
node-version: [18.x, 20.x, 22.x]

steps:
- name: Checkout
uses: actions/[email protected]

- name: Download build artifacts
uses: actions/[email protected]
with:
name: build-artifacts
path: |
dist
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/[email protected]

- name: Install CLI dependencies
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
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/node-red-node
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
# TODO: dedup this since it is possible to run in bash
integration_test_windows:
name: Integration Tests - Windows
needs: build
runs-on: windows-latest
env:
CI: true
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]

steps:
- name: Checkout
uses: actions/[email protected]

- name: Download build artifacts
uses: actions/[email protected]
with:
name: build-artifacts
path: |
dist
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/[email protected]

- 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/node-red-node
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
nrg build
nrg build -e dev
# TODO: uncomment this once @allanoricil/nrg-cli >= 1.2.2
# ./node_modules/.bin/nrg build
# ./node_modules/.bin/nrg build -e dev
# TODO: start node-red in windows using global and local dev dependency
135 changes: 135 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: Reusable Integration
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/[email protected]

- name: Setup Node
uses: actions/[email protected]
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/[email protected]
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/[email protected]

- name: Download build artifacts
uses: actions/[email protected]
with:
name: build-artifacts
path: |
dist
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/[email protected]

- 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/node-red-node
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/[email protected]
with:
name: nrg-logs-${{ inputs.os }}-${{ matrix.node-version }}
path: |
.nrg/nrg.log
11 changes: 11 additions & 0 deletions .github/workflows/macos.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: macos
on:
push:
branches:
- "**"

jobs:
integration-tests:
uses: ./.github/workflows/integration.yaml
with:
os: macos-latest
11 changes: 11 additions & 0 deletions .github/workflows/ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: ubuntu
on:
push:
branches:
- "**"

jobs:
integration-tests:
uses: ./.github/workflows/integration.yaml
with:
os: ubuntu-latest
11 changes: 11 additions & 0 deletions .github/workflows/windows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: windows
on:
push:
branches:
- "**"

jobs:
integration-tests:
uses: ./.github/workflows/integration.yaml
with:
os: windows-latest
20 changes: 10 additions & 10 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 303309c

Please sign in to comment.