-
Notifications
You must be signed in to change notification settings - Fork 3
38 lines (32 loc) · 1017 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
31
32
33
34
35
36
37
38
name: Run CI Tasks
on: [ push, pull_request ]
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: rails
MYSQL_DATABASE: gtfs_rails_api
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3']
steps:
- uses: actions/checkout@v2
- 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
env:
RAILS_ENV: test
DATABASE_URL: mysql2://root:[email protected]:${{ job.services.mysql.ports['3306'] }}/gtfs_rails_api_test
run: |
bin/rails db:reset
bin/rails test