Skip to content

CI: Workaround sporadic segfaults with retries #77

CI: Workaround sporadic segfaults with retries

CI: Workaround sporadic segfaults with retries #77

Workflow file for this run

name: Unit and integration tests
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
perl:
- '5.16'
- '5.20'
- '5.26'
- '5.30'
- '5.34'
- '5.38'
- '5.40'
- latest
include:
- os: macos-latest
perl: '5.26'
- os: macos-latest
perl: latest
name: 🐪 Perl ${{ matrix.perl }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
- name: perl -V
run: perl -V
- name: Set up perl
run: |
cpanm --with-feature=ci --installdeps --notest .
perl Build.PL
./Build build
- name: Run tests
if: matrix.perl != 'latest' || matrix.os == 'macos-latest'
run: |
TEST_SHARED=1 TEST_SUBREAPER=1 prove -l t
- name: Run tests with coverage and retry
if: matrix.perl == 'latest' && matrix.os != 'macos-latest'
run: |
# t/01_run.t can segfault, retrying multiple times
# See https://progress.opensuse.org/issues/180026
curl https://raw.githubusercontent.com/okurz/retry/refs/heads/main/retry > retry
chmod +x retry
./retry -r 7 env TEST_SHARED=1 TEST_SUBREAPER=1 PERL5OPT="-MDevel::Cover=-coverage,statement" prove -l t
cover -report codecovbash
- name: Upload coverage to ☂️ Codecov
uses: codecov/codecov-action@v5
if: matrix.perl == 'latest' && matrix.os != 'macos-latest'
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: cover_db/codecov.json
fail_ci_if_error: true
verbose: true