-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (41 loc) · 1004 Bytes
/
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
name: Ruby
env:
TZ: Europe/London
on:
- push
- pull_request
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_DATABASE: mixtio_test
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
env:
RAILS_ENV: test
DB_PORT: 3306
DB_PASSWORD: root
steps:
- name: Start MySQL
run: sudo service mysql start
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
cache-version: 1
bundler-cache: true # Runs bundle install and caches gems. See the ruby_test.yml
# example if you need more control over bundler.
- name: Set up environment
run: |
bundle exec rails db:setup
- name: Run tests
run: bundle exec rspec