From 06aa47ec0c8fb091f9abdf24f0c2b8b26b554243 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Fri, 9 Aug 2024 11:30:21 +0200 Subject: [PATCH 1/4] add workflow for la semaphorica cartesio --- .github/workflows/semaphorica_cartesio.yaml | 48 +++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/semaphorica_cartesio.yaml diff --git a/.github/workflows/semaphorica_cartesio.yaml b/.github/workflows/semaphorica_cartesio.yaml new file mode 100644 index 00000000..8d4dc656 --- /dev/null +++ b/.github/workflows/semaphorica_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 Semaphorica 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/semaphorica_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 From d9db7b53286196f5fef5bb123c8d23fc041efe68 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Fri, 9 Aug 2024 14:22:15 +0200 Subject: [PATCH 2/4] Create semaphorica_cartesio.yaml --- config/semaphorica_cartesio.yaml | 78 ++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 config/semaphorica_cartesio.yaml diff --git a/config/semaphorica_cartesio.yaml b/config/semaphorica_cartesio.yaml new file mode 100644 index 00000000..fafad4b2 --- /dev/null +++ b/config/semaphorica_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. From 27a432722cb7de0a2b69f981f63ae626c16bdbe9 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Fri, 9 Aug 2024 15:07:43 +0200 Subject: [PATCH 3/4] change semaphorica to semaforica --- .../{semaphorica_cartesio.yaml => semaforica_cartesio.yaml} | 4 ++-- .../{semaphorica_cartesio.yaml => semaforica_cartesio.yaml} | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{semaphorica_cartesio.yaml => semaforica_cartesio.yaml} (94%) rename config/{semaphorica_cartesio.yaml => semaforica_cartesio.yaml} (100%) diff --git a/.github/workflows/semaphorica_cartesio.yaml b/.github/workflows/semaforica_cartesio.yaml similarity index 94% rename from .github/workflows/semaphorica_cartesio.yaml rename to .github/workflows/semaforica_cartesio.yaml index 8d4dc656..3eaa4506 100644 --- a/.github/workflows/semaphorica_cartesio.yaml +++ b/.github/workflows/semaforica_cartesio.yaml @@ -4,7 +4,7 @@ # documentation. # This workflow will run rspec -name: La Semaphorica Cartesio +name: La Semaforica Cartesio on: pull_request: types: [ opened, reopened, synchronize, labeled ] @@ -29,7 +29,7 @@ jobs: - name: Run tests run: bundle exec rspec --format Validator::Brief --format Validator::Details --out log/validation.log spec/site/tlc env: - SITE_CONFIG: config/semaphorica_cartesio.yaml + SITE_CONFIG: config/semaforica_cartesio.yaml - name: Show detailed log if: always() diff --git a/config/semaphorica_cartesio.yaml b/config/semaforica_cartesio.yaml similarity index 100% rename from config/semaphorica_cartesio.yaml rename to config/semaforica_cartesio.yaml From 13049e8f22734804c70968fae96601e247938e56 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Tue, 13 Aug 2024 08:35:46 +0200 Subject: [PATCH 4/4] include TECSEN in workflow name --- .github/workflows/semaforica_cartesio.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/semaforica_cartesio.yaml b/.github/workflows/semaforica_cartesio.yaml index 3eaa4506..60465de6 100644 --- a/.github/workflows/semaforica_cartesio.yaml +++ b/.github/workflows/semaforica_cartesio.yaml @@ -4,7 +4,7 @@ # documentation. # This workflow will run rspec -name: La Semaforica Cartesio +name: La Semaforica TECSEN Cartesio on: pull_request: types: [ opened, reopened, synchronize, labeled ]