-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (42 loc) · 1.09 KB
/
tests.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
name: Run Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
env:
TERM: xterm-256color
BM: "true"
FORCE_COLOR: "1"
strategy:
matrix:
ruby-version: ["3.3"]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Run tests
run: |
output=$(bundle exec rake 2>&1)
echo "test_output<<EOF" >> $GITHUB_OUTPUT
echo "$output" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
continue-on-error: true
- name: Display test output
run: |
echo "${{ steps.run_tests.outputs.test_output }}"
if: always()
- name: Check test results
run: |
if [[ "${{ steps.run_tests.outcome }}" == "failure" ]]; then
echo "Tests failed"
exit 1
fi