CI: GitHub dropped Ubuntu 18.04 runners; switch to 20.04 for MySQL 5.7 test #243
Workflow file for this run
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
# 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', ssl_cert_dir: '/tmp/mysql2'} | |
# 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@v3 | |
- 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 \ | |
-e TEST_RUBY_MYSQL2_SSL_CERT_DIR="${{ matrix.ssl_cert_dir || '' }}" \ | |
--cap-add=SYS_PTRACE --security-opt seccomp=unconfined \ | |
mysql2 |