-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (54 loc) · 1.32 KB
/
test.yaml
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
53
54
55
56
57
name: Test
on:
push:
paths-ignore:
- doc/**
- README.md
pull_request: {}
jobs:
test:
name: Test Log Archiver
strategy:
fail-fast: false
matrix:
ruby:
- 2.7
- 3.0
- 3.1
- 3.2
mroonga:
- latest
- mysql80-latest
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.head_commit.message, '[ci skip]')"
env:
RAILS_ENV: test
TZ: Asia/Tokyo
services:
db:
image: groonga/mroonga:${{ matrix.mroonga }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
ports:
- 33060:3306
redis:
image: redis:6
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
# runs 'bundle install' and caches installed gems automatically
bundler-cache: true
# 参考: https://igarashikuniaki.net/diary/20200210.html
- name: Install JavaScript packages
run: |
yarn install
- name: Setup database
run: |
cp config/database.yml.github_actions config/database.yml
bin/rails db:setup
- name: Run tests
run: bin/rails test