Skip to content

Commit

Permalink
CI: Add test jobs using Debian containers
Browse files Browse the repository at this point in the history
This tests against specific Debian releases using all Perl module
dependencies that can be installed via `apt-get`.

This is per discussion at <#374 (comment)>.
  • Loading branch information
zmughal authored and cjfields committed May 10, 2023
1 parent a809db2 commit 38073ee
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ on:
env:
PKG_DEPS_UBUNTU: >-
libdb-dev
PKG_DEPS_DEBIAN: >-
libdb-dev
PERL_MIN_VERSION: '5.12'

jobs:
Expand Down Expand Up @@ -144,3 +146,29 @@ jobs:
run: |
cpanm --verbose --test-only .
cover -report Coveralls
containers:
needs: dist
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
container: ['debian:bullseye', 'debian:bookworm']
steps:
- name: Get dist artifact
uses: actions/download-artifact@v3
with:
name: dist
- name: Setup system deps (apt)
if: ${{ startsWith(matrix.container, 'debian:') }}
run: |
apt-get -y update && apt-get install -y --no-install-recommends perl cpanminus make apt-file
apt-file update
apt-get install -y --no-install-recommends \
${{ env.PKG_DEPS_DEBIAN }} \
$( cpanm -q --showdeps . | perl -MConfig -MCwd=abs_path '-M5;@prefixes = map abs_path($_), @Config{qw(vendorlibexp vendorarchexp)}' -lpe 's,~.*$,,; s,::,/,g; $mod = $_; $_ = join qq{\n}, map { qq{$_/${mod}.pm} } @prefixes' | apt-file search -lFf - )
- name: Run tests
run: |
cpanm --verbose --test-only .

0 comments on commit 38073ee

Please sign in to comment.