forked from jeremy/mysql2
-
Notifications
You must be signed in to change notification settings - Fork 1
30 lines (30 loc) · 1.33 KB
/
container.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
# 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