TECSEN TMacs #44
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub action for testing the TMAC supervisor system using the RSMP Validator | |
name: TECSEN TMacs | |
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: | |
validator: | |
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'testhub') }} | |
runs-on: [ self-hosted, Linux, X64, tmacs ] | |
strategy: | |
matrix: | |
core: ['3.2.2'] | |
fail-fast: false | |
steps: | |
- name: Set log id | |
shell: bash | |
id: log_id | |
run: | | |
echo "LOG_ID=\ | |
tecsen-tmacs-\ | |
core-${{ matrix.core }}-\ | |
run-\ | |
${{ github.run_id }}-\ | |
${{ github.run_number }}-\ | |
${{ github.run_attempt }}\ | |
" >> $GITHUB_OUTPUT | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Run tests | |
shell: bash | |
run: | | |
bundle exec rspec spec/supervisor \ | |
--format Validator::Brief \ | |
--format Validator::Details \ | |
--out validator-${{ steps.log_id.outputs.LOG_ID }}.log | |
env: | |
SUPERVISOR_CONFIG: config/tecsen_tmacs_supervisor.yaml | |
- name: Show detailed log | |
shell: bash | |
if: always() # even if previous steps failed | |
run: cat validator-${{ steps.log_id.outputs.LOG_ID }}.log | |
- name: Upload validator.log | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: validator-${{ steps.log_id.outputs.LOG_ID }}.log | |
path: validator-${{ steps.log_id.outputs.LOG_ID }}.log |