-
Notifications
You must be signed in to change notification settings - Fork 6
68 lines (67 loc) · 1.64 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: CI
on:
push:
branches:
- '*'
tags:
- 'v*'
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['3.1.4', '3.2.3', '3.3.0']
services:
mysql:
image: mysql:5.6
env:
MYSQL_ALLOW_EMPTY_PASSWORD: 1
MYSQL_DATABASE: nose
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=5
mongo:
image: mongo:5
ports:
- 27017:27017
options: >-
--health-cmd=mongo
--health-interval=10s
--health-timeout=5s
--health-retries=5
cassandra:
image: cassandra:3
ports:
- 9042:9042
options: >-
--health-cmd="cqlsh --debug"
--health-start-period=30s
--health-interval=10s
--health-timeout=5s
--health-retries=5
steps:
- name: Install required packages
run: sudo apt update && sudo apt-get install coinor-cbc coinor-libcbc-dev
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Populate MySQL
run: mysql -h 127.0.0.1 -uroot -Dnose < spec/support/data/mysql.sql
- name: Test
run: |
sed -i '/^--tag/d' .rspec
bundle exec rspec
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}