Skip to content

Bump the npm_and_yarn group across 3 directories with 5 updates #4916

Bump the npm_and_yarn group across 3 directories with 5 updates

Bump the npm_and_yarn group across 3 directories with 5 updates #4916

Workflow file for this run

# Copyright 2026 OpenC3, Inc.
# All Rights Reserved.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See LICENSE.md for more details.
# This file may also be used under the terms of a commercial license
# if purchased from OpenC3, Inc.
name: CLI Tests
# Only run on a push to main to avoid running for all the dependabot PRs
on:
push:
branches:
- main
pull_request:
branches:
- "**"
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
OPENC3_API_PASSWORD: password
OPENC3_API_PORT: 2900
jobs:
openc3-cli:
if: ${{ github.actor != 'dependabot[bot]' }}
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v6
- name: openc3.sh build
# This `shell` line is required to get around a known issue: https://github.com/actions/runner/issues/241#issuecomment-745902718
shell: 'script -q -e -c "bash {0}"'
run: ./openc3.sh build
- name: openc3.sh run
shell: 'script -q -e -c "bash {0}"'
run: |
set -e
! docker ps | grep openc3
./openc3.sh run
sleep 10s
docker ps | grep openc3
- name: openc3.sh stop
shell: 'script -q -e -c "bash {0}"'
run: |
set -e
./openc3.sh stop
sleep 20s
! docker ps | grep openc3
- name: openc3.sh start
shell: 'script -q -e -c "bash {0}"'
run: |
set -e
./openc3.sh start
sleep 30s
docker ps | grep openc3
# Not testing openc3.sh dev, openc3.sh test
- name: openc3.sh util encode,hash
shell: 'script -q -e -c "bash {0}"'
run: |
set -e
./openc3.sh util | grep Usage || true
./openc3.sh util encode hello | grep aGVsbG8=
./openc3.sh util hash hello | grep 2cf24d
- name: openc3.sh util tag
shell: 'script -q -e -c "bash {0}"'
run: |
set -e
./openc3.sh util tag | grep "Usage: tag" || true
./openc3.sh util tag docker.io localhost:12345 openc3inc latest openc3 mine
docker image ls | grep localhost:12345/openc3/openc3-cosmos-cmd-tlm-api | grep mine
docker image ls | grep localhost:12345/openc3/openc3-cosmos-script-runner-api | grep mine
docker image ls | grep localhost:12345/openc3/openc3-cosmos-init | grep mine
docker image ls | grep localhost:12345/openc3/openc3-operator | grep mine
docker image ls | grep localhost:12345/openc3/openc3-buckets | grep mine
docker image ls | grep localhost:12345/openc3/openc3-redis | grep mine
docker image ls | grep localhost:12345/openc3/openc3-traefik | grep mine
- name: openc3.sh util generate
shell: 'script -q -e -c "bash {0}"'
run: |
set -e
### PLUGIN ###
./openc3.sh cli generate plugin | grep "Usage" || true
./openc3.sh cli generate plugin cli-test --ruby
./openc3.sh cli generate plugin cli-test --ruby | grep "already exists" || true
cd openc3-cosmos-cli-test
../openc3.sh cli rake build VERSION=1.0.0
../openc3.sh cli validate openc3-cosmos-cli-test-1.0.0.gem
### TARGET ###
../openc3.sh cli generate target MY-cli --ruby
# Verify the target name 'MY_CLI' and lib filename 'my_cli.rb'
ls targets/MY_CLI/lib | grep my_cli.rb
../openc3.sh cli rake build VERSION=1.0.1
../openc3.sh cli validate openc3-cosmos-cli-test-1.0.1.gem
### MICROSERVICE ###
../openc3.sh cli generate microservice background --ruby
# Verify the microservice name 'BACKGROUND' and filename 'background.rb'
ls microservices/BACKGROUND | grep background.rb
../openc3.sh cli rake build VERSION=1.0.2
../openc3.sh cli validate openc3-cosmos-cli-test-1.0.2.gem
### CONVERSION ###
../openc3.sh cli generate conversion MY_CLI upcase --ruby
# Verify the conversion filename 'upcase_conversion.rb'
ls targets/MY_CLI/lib | grep upcase_conversion.rb
../openc3.sh cli rake build VERSION=1.0.3
../openc3.sh cli validate openc3-cosmos-cli-test-1.0.3.gem
### PROCESSOR ###
../openc3.sh cli generate processor MY_CLI slope --ruby
# Verify the conversion filename 'slope_processor.rb'
ls targets/MY_CLI/lib | grep slope_processor.rb
../openc3.sh cli rake build VERSION=1.0.4
../openc3.sh cli validate openc3-cosmos-cli-test-1.0.4.gem
### LIMITS_RESPONSE ###
../openc3.sh cli generate limits_response MY_CLI example --ruby
# Verify the conversion filename 'example_limits_response.rb'
ls targets/MY_CLI/lib | grep example_limits_response.rb
../openc3.sh cli rake build VERSION=1.0.5
../openc3.sh cli validate openc3-cosmos-cli-test-1.0.5.gem
- name: openc3.sh cli script list, run, spawn
shell: 'script -q -e -c "bash {0}"'
run: |
set -e
docker exec -it cosmos-openc3-redis-1 sh -c "echo -e 'AUTH openc3 openc3password\nset OPENC3__TOKEN \"\$argon2id\$v=19\$m=8,t=1,p=1\$KEDp3bRbyFK3lJLMa99kzQ\$INGoDEdgRbAG/wVie/ftzh//If91eeMTQQ5HoyKcfvY\"' | redis-cli"
# list shows all the available file names
./openc3.sh cli script list | tee /dev/tty | grep "INST/procedures/stash.rb"
# spawning a script prints only a PID
./openc3.sh cli script spawn INST/procedures/checks.rb | grep -v "^\s*\d+\s*$"
# run a script that will fail and look for the failure message
./openc3.sh cli script run --wait 20 INST/procedures/checks.rb | tee /dev/tty | grep -q "script failed"
# Check the running list for the first spawned script
./openc3.sh cli script running | tee /dev/tty | grep -q "INST/procedures/checks.rb"
# run a script that will complete successfully
./openc3.sh cli script run INST/procedures/stash.rb | tee /dev/tty | grep "script complete"
# run a suite
./openc3.sh cli script run INST/procedures/my_script_suite.rb --suite MySuite | tee /dev/tty | grep "script complete"
# run a group
./openc3.sh cli script run INST2/procedures/my_script_suite.py --suite MySuite --group ExampleGroup | tee /dev/tty | grep "script complete"
# run a group setup
./openc3.sh cli script run INST/procedures/my_script_suite.rb --suite MySuite --group ExampleGroup --method setup | tee /dev/tty | grep "script complete"
# run a group teardown
./openc3.sh cli script run INST2/procedures/my_script_suite.py --suite MySuite --group ExampleGroup --method teardown | tee /dev/tty | grep "script complete"
# run a script
./openc3.sh cli script run INST/procedures/my_script_suite.rb --suite MySuite --group ExampleGroup --script script_2 | tee /dev/tty | grep "script complete"
# Removing due to write tmp/.docker_temp_3200699358: no space left on device
# - name: openc3.sh util save,load
# shell: 'script -q -e -c "bash {0}"'
# run: |
# set -e
# ./openc3.sh util save docker.io openc3inc latest
# # Verify the images were saved
# ls tmp | grep openc3-cosmos-cmd-tlm-api-latest.tar
# ls tmp | grep openc3-cosmos-script-runner-api-latest.tar
# ls tmp | grep openc3-cosmos-init-latest.tar
# ls tmp | grep openc3-operator-latest.tar
# ls tmp | grep openc3-buckets-latest.tar
# ls tmp | grep openc3-redis-latest.tar
# ls tmp | grep openc3-traefik-latest.tar
# docker image rm openc3inc/openc3-cosmos-cmd-tlm-api:latest
# docker image rm openc3inc/openc3-cosmos-script-runner-api:latest
# docker image rm openc3inc/openc3-cosmos-init:latest
# docker image rm openc3inc/openc3-operator:latest
# docker image rm openc3inc/openc3-buckets:latest
# docker image rm openc3inc/openc3-redis:latest
# docker image rm openc3inc/openc3-traefik:latest
# ./openc3.sh util load
# # Verify the images were loaded
# docker image ls | grep openc3-cosmos-cmd-tlm-api
# docker image ls | grep openc3-cosmos-script-runner-api
# docker image ls | grep openc3-cosmos-init
# docker image ls | grep openc3-operator
# docker image ls | grep openc3-buckets
# docker image ls | grep openc3-redis
# docker image ls | grep openc3-traefik
- name: Cleanup volumes
shell: 'script -q -e -c "bash {0}"'
run: |
set -e
docker volume ls | grep openc3
./openc3.sh cleanup force
! docker volume ls | grep openc3