-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (41 loc) · 1.01 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
name: Tests
on:
pull_request:
push:
branches:
- main
jobs:
test:
strategy:
fail-fast: false
matrix:
ruby:
- "3.1"
- "3.2"
- "3.3"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- uses: harmon758/postgresql-action@v1
with:
postgresql version: 15
postgresql db: grape_boilerplate_test
postgresql user: test
postgresql password: password
- name: Run tests
run: |
bundle exec rake db:setup
bundle exec rake spec
env:
DATABASE_URL: postgres://test:[email protected]:5432/grape_boilerplate_test
RACK_ENV: test
- name: Updload code coverage results
if: matrix.ruby == 3.3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}