-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (60 loc) · 1.85 KB
/
test.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
58
59
60
61
62
63
64
65
66
67
name: Run Tests
on:
pull_request:
branches: "**"
permissions:
contents: read
checks: write
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: iknow_view_models
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
strategy:
fail-fast: false
matrix:
ruby-version: ['2.7', '3.0', '3.1', '3.2', '3.3']
include:
- ruby-version: '2.7'
bundle-gemfile: gemfiles/rails_5_2.gemfile
- ruby-version: '3.0'
bundle-gemfile: gemfiles/rails_6_0.gemfile
- ruby-version: '3.1'
bundle-gemfile: gemfiles/rails_6_1.gemfile
- ruby-version: '3.2'
bundle-gemfile: gemfiles/rails_7_0.gemfile
- ruby-version: '3.3'
bundle-gemfile: gemfiles/rails_7_1.gemfile
env: # $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.bundle-gemfile }}
DATABASE_URL: "postgres://rails:password@localhost:5432/iknow_view_models"
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests
run: bundle exec rake test
- name: Upload result
uses: actions/upload-artifact@v3
if: always()
with:
path: test/reports/
name: test_results_${{ matrix.ruby-version }}
- name: Test Report
uses: dorny/test-reporter@v1
if: always()
with:
name: Minitest Tests - ${{ matrix.ruby-version }}
path: test/reports/*.xml
reporter: java-junit