-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (28 loc) · 901 Bytes
/
ci.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
name: CI
on:
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request
# opened, synchronize, reopened by default
pull_request:
push:
branches:
- main # only on push to main branch
jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4 # download the repository
# https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
- uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version # read from file
bundler-cache: true # automatically run bundle install and cache the result
- name: Prepare DB
env:
RAILS_ENV: test
run: bundle exec rake db:schema:load
- name: Run Tests
env:
RAILS_ENV: test
run: bundle exec rails test