-
Notifications
You must be signed in to change notification settings - Fork 55
46 lines (46 loc) · 1.47 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
name: Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
DATABASE_URL: postgres://test:[email protected]:5432/grape_on_rails_test
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile.file }}.gemfile
strategy:
fail-fast: false
matrix:
gemfile:
- { ruby: '2.7', file: rails_6 }
- { ruby: '3.0', file: rails_6_1 }
- { ruby: '3.1', file: rails_7 }
- { ruby: '3.2', file: rails_7 }
- { ruby: '3.3', file: rails_7 }
# - { ruby: '3.2' ,file: rails_edge }
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.entry.ruby }}
bundler-cache: true
- name: Setup Firefox
uses: browser-actions/setup-firefox@latest
with:
firefox-version: "101.0"
- uses: browser-actions/setup-geckodriver@latest
with:
geckodriver-version: "0.31.0"
- name: Setup database configuration
run: cp config/database.gha.yml config/database.yml
- uses: harmon758/postgresql-action@v1
with:
postgresql version: "14"
postgresql db: grape_on_rails_test
postgresql user: test
postgresql password: password
- uses: coactions/setup-xvfb@v1
with:
run: |
bundle exec rake db:create
bundle exec rake spec