forked from jeremy/mysql2
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (70 loc) · 2.86 KB
/
build.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
69
70
name: Build
on: [push, pull_request]
jobs:
build:
name: >-
${{ matrix.os }} ruby ${{ matrix.ruby }} ${{ matrix.db }}
# Run all the tests on the new environment as much as possible.
# https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.allow-failure || false }}
strategy:
matrix:
os:
# Use ubuntu-18.04 instead of ubuntu-20.04 temporarily, due to a failing test on mysql 8.0.
# https://github.com/brianmario/mysql2/issues/1165
# - ubuntu-20.04 # focal
- ubuntu-18.04 # bionic
# - ubuntu-16.04 # xenial
ruby:
- '3.1'
- '3.0'
- '2.7'
- '2.6'
- '2.5'
- '2.4'
- '2.3'
- '2.2'
- '2.1'
db: ['']
include:
# Allow failure due to Mysql2::Error: Unknown system variable 'session_track_system_variables'.
- {os: ubuntu-16.04, ruby: '2.4', db: mariadb10.0, allow-failure: true}
# Comment out due to ci/setup.sh stucking.
# - {os: ubuntu-18.04, ruby: 2.4, db: mariadb10.1}
# Allow failure due to the issue #965, #1165.
- {os: ubuntu-20.04, ruby: '2.4', db: mariadb10.3, allow-failure: true}
- {os: ubuntu-18.04, ruby: '2.4', db: mysql57}
# Allow failure due to the issue #1165.
- {os: ubuntu-20.04, ruby: '2.4', db: mysql80, allow-failure: true}
- {os: ubuntu-18.04, ruby: 'head', db: '', allow-failure: true}
# db: A DB's brew package name in macOS case.
# Set a name "db: '[email protected]'" when using an old version.
# MariaDB lastet version
# Allow failure due to the following test failures that rarely happens.
# https://github.com/brianmario/mysql2/issues/1194
- {os: macos-latest, ruby: '2.4', db: mariadb, allow-failure: true}
# MySQL latest version
# Allow failure due to the issue #1165.
- {os: macos-latest, ruby: '2.4', db: mysql, allow-failure: true}
# On the fail-fast: true, it cancels all in-progress jobs
# if any matrix job fails unlike Travis fast_finish.
fail-fast: false
steps:
- uses: actions/checkout@v2
# https://github.com/ruby/setup-ruby
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install openssl
if: matrix.os == 'macos-latest'
run: |
brew update
brew install openssl
- run: ruby -v
- run: bundle install --without development
- if: matrix.db != ''
run: echo 'DB=${{ matrix.db }}' >> $GITHUB_ENV
- run: sudo echo "127.0.0.1 mysql2gem.example.com" | sudo tee -a /etc/hosts
- run: bash ci/setup.sh
- run: bundle exec rake spec