Skip to content

Commit

Permalink
Merge pull request #403 from rsmp-nordic/cartesio
Browse files Browse the repository at this point in the history
Add workflow for La Semaforica Cartesio
  • Loading branch information
emiltin authored Aug 13, 2024
2 parents 225259f + 13049e8 commit 9139691
Show file tree
Hide file tree
Showing 2 changed files with 126 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/semaforica_cartesio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will run rspec

name: La Semaforica TECSEN Cartesio
on:
pull_request:
types: [ opened, reopened, synchronize, labeled ]
schedule:
# schedule runs only on the default branch. time is in UTC.
# * is a special character in YAML so you have to quote this string.
# run every night at 10:00PM UTC.
- cron: '0 22 * * *'
jobs:
test:
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'testhub') }}
runs-on: [ self-hosted, Linux, X64, cartesio ]
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true # runs 'bundle install' and caches installed gems

- name: Run tests
run: bundle exec rspec --format Validator::Brief --format Validator::Details --out log/validation.log spec/site/tlc
env:
SITE_CONFIG: config/semaforica_cartesio.yaml

- name: Show detailed log
if: always()
run: cat log/validation.log

- name: Rename validation.log
if: always()
run: |
mv log/validation.log log/validation_cartesio_$(date +%F_%H-%M-%S).log
- name: Upload validation.log
if: always()
uses: actions/upload-artifact@v4
with:
name: rspec-validation
path: log/validation_cartesio_*.log
78 changes: 78 additions & 0 deletions config/semaforica_cartesio.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
port: 12111
ips: all
sxl: tlc # Traffic Light Controller. We are testing a site, not a server.
intervals:
timer: 1 # main validator timer resolution in seconds
watchdog: 60 # send watchdog every x seconds
timeouts: # Timeouts used when waiting for messages from site.
watchdog: 60
acknowledgement: 60
connect: 120 # Max time to wait for rsmp site to connect to server.
ready: 60
status_response: 120
status_update: 120
subscribe: 60
command: 60
command_response: 60
alarm: 60
disconnect: 60
shutdown: 60
startup_sequence: 60
functional_position: 60
yellow_flash: 60
priority_completion: 60
components:
main:
CAR_TC_001:
signal_group: # Each signal group must be specified manually
CAR_SG_001:
CAR_SG_002:
CAR_SG_003:
CAR_SG_004:
CAR_SG_005:
CAR_SG_006:
CAR_SG_007:
CAR_SG_008:
CAR_SG_009:
CAR_SG_010:
CAR_SG_011:
CAR_SG_012:
CAR_SG_013:
CAR_SG_014:
CAR_SG_015:
detector_logic: # Each detector logic must be specified manually
CAR_DL_001:
CAR_DL_002:
CAR_DL_003:
CAR_DL_004:
CAR_DL_005:
CAR_DL_006:
CAR_DL_007:
CAR_DL_008:
CAR_DL_009:
CAR_DL_010:
CAR_DL_011:
CAR_DL_012:
CAR_DL_013:
CAR_DL_014:
CAR_DL_015:
CAR_DL_016:
items:
plans: [1,2,3,4]
traffic_situations: [1,2,3,4]
emergency_routes: [1]
inputs: [1,2,3,4]
force_input: 1
outputs: [1,2,3,4]
startup_sequence: 'efg'
secrets:
security_codes:
1: 1234
2: 12341234
restrict_testing:
core_version: 3.1.5
sxl_version: 1.0.15
alarms:
A0302:
activation_input: 16 # input 2 activates the control block
component: CAR_DL_016 # detector logic 2 is set to error by control block.

0 comments on commit 9139691

Please sign in to comment.