File: test.yml

package info (click to toggle)
pkwalify 1.24-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 200 kB
  • sloc: perl: 1,539; makefile: 2
file content (128 lines) | stat: -rw-r--r-- 4,990 bytes parent folder | download
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: CI

on:
  push:
    branches-ignore:
      - '*travis*'
      - '*appveyor*'
      - '*doozer*'
  pull_request:
  workflow_dispatch:

jobs:
  test:
    name: ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include:
          - os: 'ubuntu-20.04'
          - os: 'ubuntu-22.04'
          - os: 'ubuntu-24.04'

    steps:
    - name: apt hacks
      # removing non-needed apt repositories may speed up "apt-get update"
      # also, 3rd party repositories might be unreliable
      run: |
        sudo rm -f /etc/apt/sources.list.d/*.list
        sudo apt-get update -qq
      if: "startsWith(matrix.os, 'ubuntu-')"
    - uses: taiki-e/checkout-action@v1
    - name: Preinstall, Configure, Build and Test
      env:
        HARNESS_TIMER:   1
        HARNESS_OPTIONS: j8
      run: |
        sudo apt-get install -qq --no-install-recommends cpanminus
        cpanm --sudo --quiet --installdeps --notest . || ( cat ~/.cpanm/work/*/build.log; false )
        perl Makefile.PL
        make -j8
        make test
      if: "!startsWith(matrix.os,'windows-')"

  test_in_container:
    name: Test with perl ${{ matrix.perlimage }} ${{ matrix.label }}
    runs-on: ubuntu-latest
    container: perl:${{ matrix.perlimage }}
    strategy:
      matrix:
        include:
          - perlimage: 5.8.9-threaded-stretch
          - perlimage: 5.10.1-buster
          - perlimage: 5.12.5-stretch
          - perlimage: 5.14.4-stretch
          - perlimage: 5.16.3-buster
          - perlimage: 5.18.4-buster
          - perlimage: 5.22.4-stretch
          - perlimage: 5.24.4-threaded-buster
            WITH_JSON_XS: 1
            WITH_YAML_SYCK: 1
            label: "with JSON::XS + YAML::Syck"
          - perlimage: 5.26.3-buster
            WITH_JSON_XS: 1
            WITH_YAML_XS: 1
            label: "with JSON::XS + YAML::XS"
          - perlimage: 5.28.3-buster
            WITH_JSON: 1
            WITH_YAML: 1
            label: "with JSON + YAML"
          - perlimage: 5.30.3-bullseye
            WITH_YAML_SYCK: 1
            label: "with YAML::Syck"
          - perlimage: 5.32.1-bullseye
            WITH_YAML_XS: 1
            label: "with YAML::XS"
          - perlimage: 5.34.3-bullseye
            WITH_YAML_PP: 1
            label: "with YAML::PP"
          - perlimage: 5.36.3-bookworm
            WITH_YAML: 1
            label: "with YAML"
          - perlimage: 5.38.2-bookworm
            WITH_JSON: 1
            WITH_YAML: 1
            WITH_IPC_RUN: 1
            DO_COVERALLS: 1
            label: "with JSON + YAML + IPC::Run + DO_COVERALLS"
          - perlimage: 5.40.0-slim-bookworm

    steps:
    - name: apt hacks
      run: |
        set -e
        CODENAME=$(perl -nle '/^VERSION_CODENAME="?([^"]+)/ and $codename=$1; /^VERSION="\d+ \((.*)\)/ and $maybe_codename=$1; END { print $codename || $maybe_codename }' /etc/os-release)
        case "$CODENAME" in
          wheezy|jessie|stretch)
            echo "APT::Get::AllowUnauthenticated 1;" > /etc/apt/apt.conf.d/02allow-unsigned
            echo "deb [check-valid-until=no] http://archive.debian.org/debian $CODENAME main"                   >  /etc/apt/sources.list
            echo "deb [check-valid-until=no] http://archive.debian.org/debian-security/ $CODENAME/updates main" >> /etc/apt/sources.list
            ;;
        esac
    - uses: taiki-e/checkout-action@v1
    - name: Preinstall, Configure, Build and Test
      env:
        HARNESS_TIMER:   1
        HARNESS_OPTIONS: j8
        DO_COVERALLS:    ${{ matrix.DO_COVERALLS }}
        WITH_JSON_XS:    ${{ matrix.WITH_JSON_XS }}
        WITH_JSON:       ${{ matrix.WITH_JSON }}
        WITH_YAML_SYCK:  ${{ matrix.WITH_YAML_SYCK }}
        WITH_YAML_XS:    ${{ matrix.WITH_YAML_XS }}
        WITH_YAML_PP:    ${{ matrix.WITH_YAML_PP }}
        WITH_YAML:       ${{ matrix.WITH_YAML }}
        WITH_IPC_RUN:    ${{ matrix.WITH_IPC_RUN }}
      run: |
        [ "$DO_COVERALLS"   =  1 ] && cpanm --quiet --notest Devel::Cover::Report::Coveralls    || true
        [ "$WITH_JSON_XS"   =  1 ] && cpanm --quiet --notest JSON::XS                           || true
        [ "$WITH_JSON"      =  1 ] && cpanm --quiet --notest JSON                               || true
        [ "$WITH_YAML_SYCK" =  1 ] && cpanm --quiet --notest YAML::Syck                         || true
        [ "$WITH_YAML_XS"   =  1 ] && cpanm --quiet --notest YAML::XS                           || true
        [ "$WITH_YAML_PP"   =  1 ] && cpanm --quiet --notest YAML::PP                           || true
        [ "$WITH_YAML"      =  1 ] && cpanm --quiet --notest YAML                               || true
        [ "$WITH_IPC_RUN"   =  1 ] && cpanm --quiet --notest IPC::Run                           || true
        cpanm --quiet --installdeps --notest . || ( cat ~/.cpanm/work/*/build.log; false )
        perl Makefile.PL
        make -j8
        make test
        [ "$DO_COVERALLS"   =  1 ] && cover -test -report coveralls || true