forked from jeremy/mysql2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'brianmario/master' into force_latin1_to…
…_utf8
- Loading branch information
Showing
47 changed files
with
1,340 additions
and
426 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.bundle | ||
Gemfile.lock | ||
spec/configuration.yml | ||
spec/my.cnf | ||
tmp | ||
vendor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
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.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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Test Linux distributions which do not exist on GitHub Actions | ||
# by the containers. | ||
name: Container | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
name: >- | ||
${{ matrix.distro }} ${{ matrix.image }} ${{ matrix.name_extra || '' }} | ||
runs-on: ubuntu-20.04 # focal | ||
continue-on-error: ${{ matrix.allow-failure || false }} | ||
strategy: | ||
matrix: | ||
include: | ||
# CentOS 7 system Ruby is the fixed version 2.0.0. | ||
- {distro: centos, image: 'centos:7', name_extra: 'ruby 2.0.0'} | ||
# Fedora latest stable version | ||
- {distro: fedora, image: 'fedora:latest'} | ||
# Fedora development version | ||
- {distro: fedora, image: 'fedora:rawhide'} | ||
# 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 | ||
- run: docker build -t mysql2 -f ci/Dockerfile_${{ matrix.distro }} --build-arg IMAGE=${{ matrix.image }} . | ||
# Add the "--cap-add=... --security-opt seccomp=..." options | ||
# as a temporary workaround to avoid the following issue | ||
# in the Fedora >= 34 containers. | ||
# https://bugzilla.redhat.com/show_bug.cgi?id=1900021 | ||
- run: docker run --add-host=mysql2gem.example.com:127.0.0.1 -t --cap-add=SYS_PTRACE --security-opt seccomp=unconfined mysql2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: RuboCop | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Ruby 2.4 | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.4 | ||
- name: Cache gems | ||
uses: actions/cache@v1 | ||
with: | ||
path: vendor/bundle | ||
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-rubocop- | ||
- name: Install gems | ||
run: | | ||
bundle config path vendor/bundle | ||
bundle install --jobs 4 --retry 3 | ||
- name: Run RuboCop | ||
run: bundle exec rubocop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.