Merge pull request #403 from rsmp-nordic/cartesio #904
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
# 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: Gem TLC | |
on: push | |
jobs: | |
test: | |
timeout-minutes: 10 | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install Ruby and gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
# ruby-version is not needed because we have a .tool-versions file | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Start TLC in background | |
shell: bash | |
run: bundle exec rsmp site --type tlc --config config/simulator/tlc.yaml 2>&1 > simulator.log & | |
- name: Run tests | |
shell: bash | |
run: bundle exec rspec --format Validator::Brief --format Validator::Details --out log/validation.log spec/site | |
env: | |
SITE_CONFIG: config/gem_tlc.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_ruby_$(date +%F_%H-%M-%S).log | |
- name: Upload validation.log | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rspec-validation-${{ matrix.os }} | |
path: log/validation_ruby_*.log | |
- name: Upload simulator.log | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: simulator-log-${{ matrix.os }} | |
path: simulator.log |