-
Notifications
You must be signed in to change notification settings - Fork 55
50 lines (50 loc) · 1.55 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
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
continue-on-error: ${{ matrix.gemfile.experimental }}
strategy:
fail-fast: false
matrix:
ruby:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
gemfile:
- { file: rails_6, experimental: false }
- { file: rails_6_1, experimental: false }
- { file: rails_7, experimental: false }
- { file: rails_edge, experimental: true }
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.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