-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (49 loc) · 1.65 KB
/
gem_supervisor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# 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 supervisor
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@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
# ruby-version is not needed because we have a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Start supervisor in background
shell: bash
run: bundle exec rsmp supervisor --config config/simulator/supervisor.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/supervisor
env:
SUPERVISOR_CONFIG: config/gem_supervisor.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@v3
with:
name: rspec validation
path: log/validation_ruby_*.log
- name: Upload simulator.log
if: always()
uses: actions/upload-artifact@v3
with:
name: simulator log
path: simulator.log