You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spamassassin.apache.org by si...@apache.org on 2023/01/09 11:53:10 UTC

svn commit: r1906485 - in /spamassassin/trunk/.github: ./ actions/install_cpan_dependencies_for_sa/ actions/mysql/ actions/postgres/ actions/setup_macos_for_sa_test/ actions/setup_ubuntu_for_sa_test/ workflows/

Author: sidney
Date: Mon Jan  9 11:53:09 2023
New Revision: 1906485

URL: http://svn.apache.org/viewvc?rev=1906485&view=rev
Log:
Bug 8056 - Update actions tests for SpamAssassin

Added:
    spamassassin/trunk/.github/README.md
    spamassassin/trunk/.github/actions/mysql/
    spamassassin/trunk/.github/actions/mysql/action.yml
    spamassassin/trunk/.github/actions/postgres/
    spamassassin/trunk/.github/actions/postgres/action.yml
    spamassassin/trunk/.github/workflows/spamassassin_make_test.yml
Removed:
    spamassassin/trunk/.github/workflows/makefile_one_native.yml
Modified:
    spamassassin/trunk/.github/actions/install_cpan_dependencies_for_sa/action.yml
    spamassassin/trunk/.github/actions/setup_macos_for_sa_test/action.yml
    spamassassin/trunk/.github/actions/setup_ubuntu_for_sa_test/action.yml

Added: spamassassin/trunk/.github/README.md
URL: http://svn.apache.org/viewvc/spamassassin/trunk/.github/README.md?rev=1906485&view=auto
==============================================================================
--- spamassassin/trunk/.github/README.md (added)
+++ spamassassin/trunk/.github/README.md Mon Jan  9 11:53:09 2023
@@ -0,0 +1,41 @@
+### Apache SpamAssassin
+#### GitHub Actions for testing
+
+The [Apache SpamAssassin project](https://spamassassin.apache.org/ "Apache SpamAssassin project") uses a [subversion repo](https://svn.apache.org/repos/asf/spamassassin/ "subversion repo") for its development process. A read-only mirror of the repo is maintained on GitHub [here](https://github.com/apache/spamassassin "here").
+
+The .github directory containing this README file is not part of the Apache SpamAssassin release package. The files in this directory are intended for use by developers to run tests using GitHub's Actions facility on GitHub hosted runners.
+
+The Apache SpamAssassin Project Management Committe has not made any arrangements to use the resources allocated to the Apache Software Foundation by GitHub to run builds and tests. The actions defined in this directory are available for anyone, including active developers of SpamAssassin, to run in their personal GitHub fork of the repo. However, the inclusion of the files in this repository does not comprise a formal release of the software to the public.
+
+#### How to use
+
+- Fork this repo to your own GitHub repo
+- Usually the default settings for the repo will allow you to run actions. If not, see [Managing GitHub Actions]( https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/enabling-features-for-your-repository/managing-github-actions-settings-for-a-repository "Managing GitHub Actions").
+- Click on the **Actions** tab
+- Click on **SpamAssassin make test** in the left sidebar
+- Click on the **Run workflow** dropdown button on the right of the page
+- Edit the four input boxes in the dropdown to select those options that you want to run. Make sure that you follow the syntax of the options as shown, i.e., keep the square braces, use quotes and commas where the dropdown already does.
+- Click the **Run workflow** button to submit the jobs
+- Click the **Actions** tab to refresh the screen and show the submitted workflow run, then click the entry for the run you just submitted to see the jobs that are included in it, displayed in the left sidebar.
+
+The workflow run you submit will have one job for every valid combination of values from the first three input boxes.
+
+The fourth input box allows you to enter the tests to be run, im the same format as used for TEST_FILES in a make test command line. If left empty, it means run all tests.
+
+No matter what is entered in the tests box, the tests that use SQL will only be run in the jobs that have postgres or mysql specified for database. Also, the spamd stress tests and root tests are never run.
+
+GitHub has limits on number of jobs you can run simultaneously on the various platforms. Jobs you submit that are over that limit will be queued to be started as other jobs finish.
+
+Clicking on a job listed in the left sidebar will open a pane showing the log output of the job. A job that ends with errors will have a red X icon. You can check the log output for details. Some errors will result in the t/log directory contents being zipped up as an artifact you can download. When you are viewing the log pane, click on the **Summary** icon above the left sidebar, If there are any artifacts to download, there will be a number you can click on under the heading **Artifacts**.
+
+#### Notes
+
+The number of jobs run is the product of the options you specify in the three input boxes. Unless you want to test SpamAssassin on every possible version of perl, which you might if you are the release manager preparing a new release, you will likely want to select only one recent version of perl.
+
+The options box for runners only shows the "-latest" names, but you can enter any GitHub hosted runner that they make available, e.g. ubuntu-20.04 or macos-11.
+
+Windows is tested using Strawberry Perl, of which the latest release is 5.32. If you have 34 or 36 in the perl versions list, they will not generate jobs on the Windows platform.
+
+Jobs run using the database option postgres or mysql will only run the various sql tests. Jobs run using the none option for database will run all the other tests.
+
+Some tests, especially some that rely on network access such as t/dnsbl.t, seem to fail occassionally, especially when you are running many jobs simultaneously. After all the jobs of a workflow have completed, you can rerun just those that have failed by clicking on the **Re-run jobs** button in the overview page for the jobs, and then selecting **Re-run failed jobs**. Repeat until jobs that seem to be only intermittent failures have successfully passed.

Modified: spamassassin/trunk/.github/actions/install_cpan_dependencies_for_sa/action.yml
URL: http://svn.apache.org/viewvc/spamassassin/trunk/.github/actions/install_cpan_dependencies_for_sa/action.yml?rev=1906485&r1=1906484&r2=1906485&view=diff
==============================================================================
--- spamassassin/trunk/.github/actions/install_cpan_dependencies_for_sa/action.yml (original)
+++ spamassassin/trunk/.github/actions/install_cpan_dependencies_for_sa/action.yml Mon Jan  9 11:53:09 2023
@@ -1,23 +1,52 @@
-name: 'Install CPAN modules for SpamAssassin build and test Linux and Mac'
+name: 'Install CPAN modules for SpamAssassin build and test'
 description: 'Assuming OS and perl already configured and installed, install from CPAN all modules needed for SpamAssassin build and test'
 runs:
   using: 'composite'
   steps:
-    - name: Install cpan modules
+    - name: Install cpan modules Linux and macOS
+      if: ${{ runner.os != 'Windows' }}
       run: |
-          #cpanm App::cpanoutdated -nq --install-args="--install_path sbin=$HOME/.local/bin"
-          #hash -r
-          cpanm -n Module::Install Archive::Zip BSD::Resource BerkeleyDB Compress::Zlib DBI DB_File Devel::Cycle Digest::SHA Digest::SHA1 Email::Address::XS Encode::Detect Encode::Detect::Detector Geo::IP GeoIP2 GeoIP2::Database::Reader Geography::Countries HTML::Parser HTTP::Cookies HTTP::Daemon HTTP::Date HTTP::Negotiate IO::Socket::INET6 IO::Socket::SSL IO::String IP::Country IP::Country::DB_File LWP::Protocol::https LWP::UserAgent Mail::DKIM Mail::DMARC::PurePerl Math::Int128 MaxMind::DB::Reader::XS Net::CIDR::Lite Net::DNS Net::DNS::Nameserver Net::LibIDN Net::LibIDN2 Net::Patricia Net::Works::Network NetAddr::IP Params::Validate Sys::Hostname::Long Test::Perl::Critic Test::Pod Test::Pod::Coverage WWW::RobotRules Text::Diff Perl::Critic::Policy::Bangs::ProhibitBitwiseOperators Perl::Critic::Policy::Bangs::ProhibitDebuggingModules List::MoreUtils Perl::Critic::Policy::Perlsecret Perl::Critic::Policy::Compatibility::ProhibitThreeArgumentOpen Perl::Critic::Policy::Lax::ProhibitStr
 ingyEval::ExceptForRequire Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection Perl::Critic::Policy::ControlStructures::ProhibitReturnInDoBlock || echo "warn: errors installing cpan modules have been ignored"
+          cpanm -n Module::Install Archive::Zip BSD::Resource BerkeleyDB Compress::Zlib DBI DBD::mysql DBD::Pg DB_File Devel::Cycle Digest::SHA Digest::SHA1 Email::Address::XS Encode::Detect Encode::Detect::Detector Geo::IP GeoIP2 GeoIP2::Database::Reader Geography::Countries HTML::Parser HTTP::Cookies HTTP::Daemon HTTP::Date HTTP::Negotiate IO::Socket::INET6 IO::Socket::SSL IO::String IP::Country IP::Country::DB_File LWP::Protocol::https LWP::UserAgent Mail::DKIM Mail::DMARC::PurePerl Math::Int128 MaxMind::DB::Reader::XS Net::CIDR::Lite Net::DNS Net::DNS::Nameserver Net::LibIDN Net::LibIDN2 Net::Patricia Net::Works::Network NetAddr::IP Params::Validate Sys::Hostname::Long Test::Perl::Critic Test::Pod Test::Pod::Coverage WWW::RobotRules Text::Diff Perl::Critic::Policy::Bangs::ProhibitBitwiseOperators Perl::Critic::Policy::Bangs::ProhibitDebuggingModules List::MoreUtils Perl::Critic::Policy::Perlsecret Perl::Critic::Policy::Compatibility::ProhibitThreeArgumentOpen Perl::Critic::Polic
 y::Lax::ProhibitStringyEval::ExceptForRequire Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection Perl::Critic::Policy::ControlStructures::ProhibitReturnInDoBlock || echo "warn: errors installing cpan modules have been ignored"
           cpanm Razor2::Client::Agent -n --install-args="DESTINSTALLSITESCRIPT=$HOME/.local/bin" || echo "warn: errors installing Razor2::Client::Agent have been ignored"
           hash -r
           razor-admin --create
           razor-admin --register
           cpanm Mail::SPF -n --install-args="--install_path sbin=$HOME/.local/bin" || echo "warn: errors installing Mail::SPF have been ignored"
-          cpanm --installdeps --notest .  || echo "warn: errors installing required cpan modules have been ignored"
-          echo "Finished step"
+          cpanm --installdeps -n .  || echo "warn: errors installing required cpan modules have been ignored"
       shell: bash
 
     - name: Show content of log files on Linux and Mac
-      if: ${{ failure() }}
+      if: ${{ failure() && (runner.os != 'Windows') }}
       run: cat $HOME/.cpanm/work/*/build.log
       shell: bash
+
+    - name: Install dependencies and optional modules for full testing on Windows part 1
+      if: ${{ runner.os == 'Windows' }}
+      run: |
+        cpanm -n Module::Install Archive::Zip BSD::Resource BerkeleyDB Compress::Zlib DBI DBD::mysql DBD::Pg DB_File DB_File Devel::Cycle Digest::SHA Digest::SHA1 Email::Address::XS Encode::Detect Encode::Detect::Detector Geo::IP GeoIP2 GeoIP2::Database::Reader Geography::Countries HTML::Parser HTTP::Cookies HTTP::Daemon HTTP::Date HTTP::Negotiate IO::Socket::INET6 IO::Socket::SSL IO::String IP::Country IP::Country::DB_File LWP::Protocol::https LWP::UserAgent Mail::DKIM Mail::DMARC::PurePerl Math::Int128 MaxMind::DB::Reader::XS Net::CIDR::Lite Net::DNS Net::DNS::Nameserver Net::LibIDN Net::LibIDN2 Net::Patricia Net::Works::Network NetAddr::IP Params::Validate Sys::Hostname::Long Test::Perl::Critic Test::Pod Test::Pod::Coverage WWW::RobotRules Text::Diff Perl::Critic::Policy::Bangs::ProhibitBitwiseOperators Perl::Critic::Policy::Bangs::ProhibitDebuggingModules List::MoreUtils Perl::Critic::Policy::Perlsecret Perl::Critic::Policy::Compatibility::ProhibitThreeArgumentOpen Perl::Critic:
 :Policy::Lax::ProhibitStringyEval::ExceptForRequire Perl::Critic::Policy::ValuesAndExpressions::PreventSQLInjection Perl::Critic::Policy::ControlStructures::ProhibitReturnInDoBlock || cmd /c "echo warn: errors installing cpan modules have been ignored"
+      shell: cmd
+
+    - name: Install dependencies and optional modules for full testing on Windows part 2
+      if: ${{ runner.os == 'Windows' }}
+      run: |
+        cpanm Razor2::Client::Agent-n --install-args="DESTINSTALLSITESCRIPT=local/bin" || cmd /c "echo warn: errors installing Razor2::Client::Agent have been ignored"
+        razor-admin --create
+        razor-admin --register
+      shell: cmd
+
+    - name: Install dependencies and optional modules for full testing on Windows part 3
+      if: ${{ runner.os == 'Windows' }}
+      run: |
+        cpanm Mail::SPF -n --install-args="--install_path sbin=local/bin" || cmd /c "echo warn: errors installing Mail::SPF have been ignored"
+      shell: cmd
+
+    - name: Install dependencies and optional modules for full testing on Windows part 4
+      if: ${{ runner.os == 'Windows' }}
+      run: |
+        cpanm --installdeps -n .  || cmd /c "echo warn: errors installing required cpan modules have been ignored"
+      shell: cmd
+
+    - name: Show content of log files on Windows
+      if: ${{ failure() && ( runner.os == 'Windows' )  }}
+      run: cat C:/Users/runner/.cpanm/work/*/build.log
+      shell: cmd

Added: spamassassin/trunk/.github/actions/mysql/action.yml
URL: http://svn.apache.org/viewvc/spamassassin/trunk/.github/actions/mysql/action.yml?rev=1906485&view=auto
==============================================================================
--- spamassassin/trunk/.github/actions/mysql/action.yml (added)
+++ spamassassin/trunk/.github/actions/mysql/action.yml Mon Jan  9 11:53:09 2023
@@ -0,0 +1,22 @@
+name: Setup MySQL for Linux/macOS/Windows
+author: Sidney Markowitz based on version by Ihor Kalnytskyi
+description: Setup MySQL for SpamAssassin testing
+runs:
+  using: composite
+  steps:
+    - uses: ankane/setup-mysql@v1
+      with:
+        database: spamassassin
+        mysql-version: ${{ ((runner.os == 'Windows') && '5.7') || '8.0' }}
+    - run: |
+        mysql -u root -h localhost -e "CREATE USER 'spamassassin'@'localhost' IDENTIFIED BY 'spamassassin'"
+        mysql -u root -h localhost -e "GRANT ALL PRIVILEGES ON *.* TO 'spamassassin'@'localhost'"
+        mysql -u root -h localhost -e "FLUSH PRIVILEGES"
+        mysql -u spamassassin -pspamassassin -h localhost -D spamassassin < sql/awl_mysql.sql
+        mysql -u spamassassin -pspamassassin -h localhost -D spamassassin < sql/bayes_mysql.sql
+      shell: bash
+
+    - name: prepare test config for MySQL
+      run: |
+          perl -i.bak -pe 's/^run_(awl_sql_tests|bayes_sql_tests)=n/run_$1=y/;s/^(user_awl|bayes_sql)_dsn=.*$/$1_dsn=dbi:mysql:database=spamassassin;host=localhost/;s/^(user_awl_sql_username|user_awl_sql_password|bayes_sql_username|bayes_sql_password)=.*$/$1=spamassassin/;s/^(bayes_store_module)=.*$/$1=Mail::SpamAssassin::BayesStore::MySQL/' t/config.dist
+      shell: bash

Added: spamassassin/trunk/.github/actions/postgres/action.yml
URL: http://svn.apache.org/viewvc/spamassassin/trunk/.github/actions/postgres/action.yml?rev=1906485&view=auto
==============================================================================
--- spamassassin/trunk/.github/actions/postgres/action.yml (added)
+++ spamassassin/trunk/.github/actions/postgres/action.yml Mon Jan  9 11:53:09 2023
@@ -0,0 +1,99 @@
+name: Setup PostgreSQL for Linux/macOS/Windows
+author: Sidney Markowitz based on version by Ihor Kalnytskyi
+description: Setup PostgreSQL for SpamAssassin testing
+runs:
+  using: composite
+  steps:
+    - name: Prerequisites
+      run: |
+        if [ "$RUNNER_OS" == "Linux" ]; then
+          echo "$(pg_config --bindir)" >> $GITHUB_PATH
+        elif [ "$RUNNER_OS" == "Windows" ]; then
+          echo "$PGBIN" >> $GITHUB_PATH
+          echo "PQ_LIB_DIR=$PGROOT\lib" >> $GITHUB_ENV
+        fi
+      shell: bash
+
+    - name: Setup and start PostgreSQL
+      run: |
+        export PGDATA="$RUNNER_TEMP/pgdata"
+        export PWFILE="$RUNNER_TEMP/pwfile"
+
+        # Unfortunately 'initdb' could only receive a password via file on disk
+        # or prompt to enter on. Prompting is not an option since we're running
+        # in non-interactive mode.
+        echo 'spamassassin' > $PWFILE
+
+        # There are couple of reasons why we need to create a new PostgreSQL
+        # database cluster. First and foremost, we have to create a superuser
+        # with provided credentials. Second, we want the PostgreSQL client
+        # applications [1] to be available for execution without
+        # run-from-another-user dances. Third, we want to make sure that
+        # settings are the same between operating systems and aren't changed by
+        # package vendors.
+        #
+        # [1] https://www.postgresql.org/docs/15/reference-client.html
+        initdb \
+          --username="spamassassin" \
+          --pwfile="$PWFILE" \
+          --auth="scram-sha-256" \
+          --encoding="UTF-8" \
+          --locale="en_US.UTF-8" \
+          --no-instructions
+
+        # Do not create unix sockets since they are created by default in the
+        # directory we have no permissions to (owned by system postgres user).
+        echo "unix_socket_directories = ''" >> "$PGDATA/postgresql.conf"
+        echo "port = 5432" >> "$PGDATA/postgresql.conf"
+        pg_ctl start
+
+        # Save required connection parameters for created superuser to the
+        # connection service file [1]. This allows using these connection
+        # parameters by setting 'PGSERVICE' environment variable or by
+        # requesting them via connection string.
+        #
+        # HOST is required for Linux/macOS because these OS-es default to unix
+        # sockets but we turned them off.
+        #
+        # PORT, USER, PASSWORD and DBNAME are required because they could be
+        # parametrized via action input parameters.
+        #
+        # [1] https://www.postgresql.org/docs/15/libpq-pgservice.html
+        cat <<EOF > "$PGDATA/pg_service.conf"
+        [spamassassin]
+        host=localhost
+        port=5432
+        user=spamassassin
+        password=spamassassin
+        dbname=spamassassin
+        EOF
+        echo "PGSERVICEFILE=$PGDATA/pg_service.conf" >> $GITHUB_ENV
+      shell: bash
+
+    - name: Setup PostgreSQL database
+      run: |
+        createdb -O "spamassassin" "spamassassin"
+        psql --username=spamassassin --host=localhost --port=5432 -d spamassassin -f sql/awl_pg.sql
+        psql --username=spamassassin --host=localhost --port=5432 -d spamassassin -f sql/bayes_pg.sql
+      env:
+        PGSERVICE: spamassassin
+        PGPASSWORD: spamassassin
+      shell: bash
+
+    - name: fixup strawberry perl postgres dll in case too old
+      if: ${{ startsWith( matrix.runner, 'windows-' )  }}
+      run: |
+        export TRG=$(dirname `which libpq__.dll`)
+        cp "$PGBIN/libpq.dll" "$TRG"
+        cd "$TRG"
+        pexports libpq.dll > libpq.def 
+        dlltool --dllname libpq.dll --def libpq.def --output-lib ..\lib\libpq.a
+        mv libpq__.dll libpq__.dll_BUP
+        mv libpq.dll libpq__.dll
+      shell: bash
+
+    - name: prepare test config for postgres
+      run: |
+          perl -i.bak -pe 's/^run_(awl_sql_tests|bayes_sql_tests)=n/run_$1=y/;s/^(user_awl|bayes_sql)_dsn=.*$/$1_dsn=dbi:Pg:dbname=spamassassin;host=localhost/;s/^(user_awl_sql_username|user_awl_sql_password|bayes_sql_username|bayes_sql_password)=.*$/$1=spamassassin/;s/^(bayes_store_module)=.*$/$1=Mail::SpamAssassin::BayesStore::PgSQL/' t/config.dist
+      shell: bash
+

Modified: spamassassin/trunk/.github/actions/setup_macos_for_sa_test/action.yml
URL: http://svn.apache.org/viewvc/spamassassin/trunk/.github/actions/setup_macos_for_sa_test/action.yml?rev=1906485&r1=1906484&r2=1906485&view=diff
==============================================================================
--- spamassassin/trunk/.github/actions/setup_macos_for_sa_test/action.yml (original)
+++ spamassassin/trunk/.github/actions/setup_macos_for_sa_test/action.yml Mon Jan  9 11:53:09 2023
@@ -5,6 +5,7 @@ runs:
   steps:
     - name: remove default user group membershipp in root group
       run: |
+        # Note this only takes effect in steps that run with sudo -u runner
         sudo dseditgroup -o edit -d runner -t user wheel
         echo "$HOME/.local/bin" >> $GITHUB_PATH
       shell: bash

Modified: spamassassin/trunk/.github/actions/setup_ubuntu_for_sa_test/action.yml
URL: http://svn.apache.org/viewvc/spamassassin/trunk/.github/actions/setup_ubuntu_for_sa_test/action.yml?rev=1906485&r1=1906484&r2=1906485&view=diff
==============================================================================
--- spamassassin/trunk/.github/actions/setup_ubuntu_for_sa_test/action.yml (original)
+++ spamassassin/trunk/.github/actions/setup_ubuntu_for_sa_test/action.yml Mon Jan  9 11:53:09 2023
@@ -46,6 +46,7 @@ runs:
            libarchive-zip-perl \
            libberkeleydb-perl \
            libbsd-resource-perl \
+           libdbd-pg-perl \
            libdigest-sha-perl \
            libencode-detect-perl \
            libgeo-ip-perl \
@@ -101,13 +102,25 @@ runs:
 
       shell: bash
 
-    - name: install plenv
-      run: |
-        cd ~/
-        git clone https://github.com/tokuhirom/plenv.git ~/.plenv
-        git clone https://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build/
-        echo "$HOME/.local/bin" >> $GITHUB_PATH
-        echo "$HOME/.plenv/bin" >> $GITHUB_PATH
-        echo "$HOME/.plenv/shims" >> $GITHUB_PATH
-        echo "PLENV_SHELL=bash"  >> $GITHUB_ENV
-      shell: bash
+    #- name: setup postgres
+    #  run: |
+    #    sudo systemctl start postgresql.service
+    #    pg_isready
+    #    sudo -u postgres psql --command="CREATE USER spamassassin PASSWORD 'spamassassin'" --command="\du"
+    #    sudo -u postgres createdb --owner=spamassassin spamassassin
+    #    PGPASSWORD=spamassassin psql --username=spamassassin --host=localhost --list spamassassin
+    #    PGPASSWORD=spamassassin psql --username=spamassassin --host=localhost -d spamassassin -f sql/awl_pg.sql
+    #    PGPASSWORD=spamassassin psql --username=spamassassin --host=localhost -d spamassassin -f sql/bayes_pg.sql
+
+    #  shell: bash
+
+    #- name: install plenv
+    #  run: |
+    #    cd ~/
+    #    git clone https://github.com/tokuhirom/plenv.git ~/.plenv
+    #    git clone https://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build/
+    #    echo "$HOME/.local/bin" >> $GITHUB_PATH
+    #    echo "$HOME/.plenv/bin" >> $GITHUB_PATH
+    #    echo "$HOME/.plenv/shims" >> $GITHUB_PATH
+    #    echo "PLENV_SHELL=bash"  >> $GITHUB_ENV
+    #  shell: bash

Added: spamassassin/trunk/.github/workflows/spamassassin_make_test.yml
URL: http://svn.apache.org/viewvc/spamassassin/trunk/.github/workflows/spamassassin_make_test.yml?rev=1906485&view=auto
==============================================================================
--- spamassassin/trunk/.github/workflows/spamassassin_make_test.yml (added)
+++ spamassassin/trunk/.github/workflows/spamassassin_make_test.yml Mon Jan  9 11:53:09 2023
@@ -0,0 +1,105 @@
+name: SpamAssassin make test
+
+on:
+    workflow_dispatch:
+      inputs:
+        runners:
+          description: 'List of runners to use [ubuntu-latest, macos-latest, windows-latest]'
+          required: true
+          default: '["ubuntu-latest", "macos-latest", "windows-latest"]'
+        perls:
+          description: 'List of perl major versions 5.xx xx even 14 - 36'
+          required: true
+          default: '[ 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14 ]'
+        database:
+          description: 'Databases to use for awl and bayes SQL tests [none, postgres, mysql]'
+          required: true
+          default: '[ "none", "postgres", "mysql" ]'
+        tests:
+          description: 'tests to run when database none, leave empty or enter t/*.t to run all non-sql tests'
+          required: false
+          type: string
+jobs:
+  perl-job:
+    strategy:
+      fail-fast: false
+      matrix:
+        runner: ${{ fromJSON(github.event.inputs.runners) }}
+        perl: ${{ fromJSON(github.event.inputs.perls) }}
+        database: ${{ fromJSON(github.event.inputs.database) }}
+        exclude:
+          - runner: windows-latest
+            perl: 36
+          - runner: windows-2022
+            perl: 36
+          - runner: windows-2019
+            perl: 36
+          - runner: windows-latest
+            perl: 34
+          - runner: windows-2022
+            perl: 34
+          - runner: windows-2019
+            perl: 34
+    env:
+      PERL5LIB: ''
+      PERL_VERSION: 5.${{matrix.perl}}
+      MAKECMD: ${{ ( !startsWith( matrix.runner, 'windows-' ) && 'make') || ((matrix.perl > 24) && 'gmake') || 'dmake' }}
+    runs-on: ${{matrix.runner}}
+    defaults:
+      run:
+        shell: ${{ ( startsWith( matrix.runner, 'windows-' ) && 'cmd' ) || 'bash' }}
+    name: OS ${{matrix.runner}} Perl 5.${{matrix.perl}} DB ${{matrix.database}}
+
+    steps:
+    - uses: actions/checkout@v3
+
+    - name: Install requirements for Ubuntu
+      if: ${{ startsWith( matrix.runner, 'ubuntu-' )  }}
+      uses: ./.github/actions/setup_ubuntu_for_sa_test
+
+    - name: Install requirements for macOS
+      if: ${{ startsWith( matrix.runner, 'macos-' )  }}
+      uses: ./.github/actions/setup_macos_for_sa_test
+
+    - name: Set up perl
+      uses: shogo82148/actions-setup-perl@v1
+      id: perl
+      with:
+        perl-version: 5.${{ matrix.perl }}
+        distribution: ${{ ( startsWith( matrix.runner, 'windows-' ) && 'strawberry' ) || 'default' }}
+
+    - name: Set up postgres
+      if: ${{ matrix.database == 'postgres' }}
+      uses: ./.github/actions/postgres
+
+    - name: Set up mysql
+      if: ${{ matrix.database == 'mysql' }}
+      uses: ./.github/actions/mysql
+
+    - name: prepare test config
+      run: |
+          perl -i.bak -pe 's/^run_(long_tests|net_tests|dcc_tests|sql_pref_tests)=n/run_$1=y/' t/config.dist
+      shell: bash
+
+    - name: Cache CPAN Modules
+      uses: actions/cache@v3
+      with:
+        path: local
+        key: perl-${{ steps.perl.outputs.perl-hash }}
+
+    - name: Install dependencies and optional modules for full testing
+      uses: ./.github/actions/install_cpan_dependencies_for_sa
+
+    - name: Run Tests
+      run: |
+          perl Makefile.PL
+          ${{ env.MAKECMD }} ENABLE_SSL=yes
+          ${{ ( startsWith( matrix.runner, 'macos-' ) && 'sudo -u $USER' ) || '' }} ${{ env.MAKECMD }} test ${{ ((matrix.database != 'none') && 'TEST_FILES="t/*sql*.t"') || (github.event.inputs.tests && format('TEST_FILES="{0}"', github.event.inputs.tests)) }}
+
+    - name: Publish logs as artifacts
+      if: ${{ failure() }}
+      uses: actions/upload-artifact@v3
+      with:
+        name: test_logs
+        path: |
+          t/log