diff --git a/.github/workflows/semaforica_cartesio.yaml b/.github/workflows/semaforica_cartesio.yaml new file mode 100644 index 00000000..60465de6 --- /dev/null +++ b/.github/workflows/semaforica_cartesio.yaml @@ -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 diff --git a/config/semaforica_cartesio.yaml b/config/semaforica_cartesio.yaml new file mode 100644 index 00000000..fafad4b2 --- /dev/null +++ b/config/semaforica_cartesio.yaml @@ -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.