-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (51 loc) · 1.29 KB
/
rails_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
51
52
name: Run rspec
on:
pull_request:
branches: ['*']
push:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
ports:
- 3306:3306
redis:
image: redis
ports: ["6379:6379"]
options: >-
--health-cmd "redis-cli ping"
--entrypoint redis-server
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
bundler: default
bundler-cache: true
- name: Run tests
run: |
bundle exec rails yarn:install
# bundle exec rake assets:precompile
yarn build:css
bundle exec rails db:create
bundle exec rails db:schema:load
bundle exec rake
env:
RAILS_ENV: test
DATABASE_PORT: 3306
DATABASE_HOST: 127.0.0.1
DATABASE_DB: github_actions_test
DATABASE_PASSWORD: password
DATABASE_USERNAME: root
REDIS_URL: redis://localhost:6379/0
GOOGLE_OAUTH2_CLIENT_ID: x
GOOGLE_OAUTH2_SECRET: x