|
| 1 | +# Test Linux distributions which do not exist on GitHub Actions |
| 2 | +# by the containers. |
| 3 | +name: Container |
| 4 | +on: [push, pull_request] |
| 5 | +jobs: |
| 6 | + build: |
| 7 | + name: >- |
| 8 | + ${{ matrix.distro }} ${{ matrix.image }} |
| 9 | + runs-on: ubuntu-20.04 # focal |
| 10 | + continue-on-error: ${{ matrix.allow-failure }} |
| 11 | + strategy: |
| 12 | + matrix: |
| 13 | + include: |
| 14 | + - {distro: centos, image: 'centos:7', allow-failure: false} |
| 15 | + # Fedora latest stable version |
| 16 | + # Allow failure due to the following test failures. |
| 17 | + # https://github.com/brianmario/mysql2/issues/965 |
| 18 | + - {distro: fedora, image: 'fedora:latest', allow-failure: true} |
| 19 | + # Fedora development version |
| 20 | + # Allow failure due to the following test failures. |
| 21 | + # https://github.com/brianmario/mysql2/issues/1152 |
| 22 | + - {distro: fedora, image: 'fedora:rawhide', allow-failure: true} |
| 23 | + # On the fail-fast: true, it cancels all in-progress jobs |
| 24 | + # if any matrix job fails unlike Travis fast_finish. |
| 25 | + fail-fast: false |
| 26 | + steps: |
| 27 | + - uses: actions/checkout@v2 |
| 28 | + - run: docker build -t mysql2 -f .travis_Dockerfile_${{ matrix.distro }} --build-arg IMAGE=${{ matrix.image }} . |
| 29 | + # Add the "--cap-add=... --security-opt seccomp=..." options |
| 30 | + # as a temporary workaround to avoid the following issue |
| 31 | + # in the Fedora >= 34 containers. |
| 32 | + # https://bugzilla.redhat.com/show_bug.cgi?id=1900021 |
| 33 | + - run: docker run --add-host=mysql2gem.example.com:127.0.0.1 -t --cap-add=SYS_PTRACE --security-opt seccomp=unconfined mysql2 |
0 commit comments