-
Notifications
You must be signed in to change notification settings - Fork 548
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GitHub Actions: Add CentOS/Fedora cases. (#1168)
* Migrate CentOS case in Travis to GitHub Actions. * Add Fedora cases as allow failure.
- Loading branch information
Showing
9 changed files
with
89 additions
and
31 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,33 @@ | ||
# 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 }} | ||
runs-on: ubuntu-20.04 # focal | ||
continue-on-error: ${{ matrix.allow-failure }} | ||
strategy: | ||
matrix: | ||
include: | ||
- {distro: centos, image: 'centos:7', allow-failure: false} | ||
# Fedora latest stable version | ||
# Allow failure due to the following test failures. | ||
# https://github.com/brianmario/mysql2/issues/965 | ||
- {distro: fedora, image: 'fedora:latest', allow-failure: true} | ||
# Fedora development version | ||
# Allow failure due to the following test failures. | ||
# https://github.com/brianmario/mysql2/issues/1152 | ||
- {distro: fedora, image: 'fedora:rawhide', 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 | ||
- run: docker build -t mysql2 -f .travis_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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Test | ||
name: Ubuntu | ||
on: [push, pull_request] | ||
jobs: | ||
build: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
FROM centos:7 | ||
ARG IMAGE=centos:7 | ||
FROM ${IMAGE} | ||
|
||
WORKDIR /build | ||
COPY . . | ||
|
||
RUN yum -y update | ||
RUN yum -y install epel-release | ||
RUN cat /etc/redhat-release | ||
RUN yum -yq update | ||
RUN yum -yq install epel-release | ||
# The options are to install faster. | ||
RUN yum -y install \ | ||
RUN yum -yq install \ | ||
--setopt=deltarpm=0 \ | ||
--setopt=install_weak_deps=false \ | ||
--setopt=tsflags=nodocs \ | ||
mariadb-server \ | ||
mariadb-devel \ | ||
ruby-devel \ | ||
git \ | ||
gcc \ | ||
gcc-c++ \ | ||
make | ||
RUN gem install --no-document "rubygems-update:~>2.7" && update_rubygems | ||
git \ | ||
make \ | ||
mariadb-devel \ | ||
mariadb-server \ | ||
ruby-devel | ||
RUN gem install --no-document "rubygems-update:~>2.7" && update_rubygems > /dev/null | ||
RUN gem install --no-document "bundler:~>1.17" | ||
|
||
CMD sh .travis_centos.sh | ||
CMD bash .travis_container.sh |
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,25 @@ | ||
ARG IMAGE=fedora:latest | ||
FROM ${IMAGE} | ||
|
||
WORKDIR /build | ||
COPY . . | ||
|
||
RUN cat /etc/fedora-release | ||
RUN dnf -yq update | ||
# The options are to install faster. | ||
RUN dnf -yq install \ | ||
--setopt=deltarpm=0 \ | ||
--setopt=install_weak_deps=false \ | ||
--setopt=tsflags=nodocs \ | ||
gcc \ | ||
gcc-c++ \ | ||
git \ | ||
make \ | ||
mariadb-connector-c-devel \ | ||
mariadb-server \ | ||
redhat-rpm-config \ | ||
ruby-devel \ | ||
rubygem-bigdecimal \ | ||
rubygem-bundler | ||
|
||
CMD bash .travis_container.sh |
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 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