]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1785938: Make tests work in GHA on 4.4 branch (#110)
authorDave Miller <github@justdave.net>
Sat, 10 Sep 2022 20:30:25 +0000 (16:30 -0400)
committerGitHub <noreply@github.com>
Sat, 10 Sep 2022 20:30:25 +0000 (13:30 -0700)
* run tests on 4.4 branch

* fix new perl compat in tests

.github/pull_request_template.md [new file with mode: 0644]
.github/workflows/release.yml [new file with mode: 0644]
t/002goodperl.t
t/003safesys.t
t/004template.t
t/005whitespace.t
t/006spellcheck.t
t/007util.t
t/009bugwords.t
t/010dependencies.t
t/011pod.t

diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
new file mode 100644 (file)
index 0000000..f0e4ee1
--- /dev/null
@@ -0,0 +1,12 @@
+#### Details
+<!-- Explain what you did -->
+This PR fixes/adds a feature...
+
+#### Additional info
+* [bmo#](https://bugzilla.mozilla.org/show_bug.cgi?id=)
+
+#### Test Plan
+<!-- How did you verify the fix/feature in steps -->
+1. Open the show_bug view
+2. Edit the bug
+3. ...
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644 (file)
index 0000000..6691125
--- /dev/null
@@ -0,0 +1,82 @@
+# This is a basic workflow to help you get started with Actions
+
+name: Release Tests
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+# events but only for the main branch
+on:
+  push:
+    branches: [ 4.4 ]
+  pull_request:
+    branches: [ 4.4 ]
+  # Allows you to run this workflow manually from the Actions tab
+  workflow_dispatch:
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+  ubuntu:
+    name: Release Tests on Ubuntu 20.04
+    runs-on: ubuntu-20.04
+    steps:
+      - name: Checkout the repository
+        uses: actions/checkout@v2
+      - name: apt install
+        run: |
+          sudo apt-get update
+          sudo apt-get -y dist-upgrade
+          sudo apt-get install --ignore-hold --allow-downgrades -y \
+          apache2 \
+          mariadb-client-10.3 \
+          netcat \
+          libappconfig-perl \
+          libdate-calc-perl \
+          libtemplate-perl \
+          build-essential \
+          libdatetime-timezone-perl \
+          libdatetime-perl \
+          libemail-address-perl \
+          libemail-sender-perl \
+          libemail-mime-perl \
+          libemail-mime-modifier-perl \
+          libdbi-perl \
+          libdbix-connector-perl \
+          libdbd-mysql-perl \
+          libcgi-pm-perl \
+          libmath-random-isaac-perl \
+          libmath-random-isaac-xs-perl \
+          libapache2-mod-perl2 \
+          libapache2-mod-perl2-dev \
+          libchart-perl \
+          libxml-perl \
+          libxml-twig-perl \
+          perlmagick \
+          libgd-graph-perl \
+          libtemplate-plugin-gd-perl \
+          libsoap-lite-perl \
+          libhtml-scrubber-perl \
+          libjson-rpc-perl \
+          libdaemon-generic-perl \
+          libtheschwartz-perl \
+          libtest-taint-perl \
+          libauthen-radius-perl \
+          libfile-slurp-perl \
+          libencode-detect-perl \
+          libmodule-build-perl \
+          libnet-ldap-perl \
+          libauthen-sasl-perl \
+          libfile-mimeinfo-perl \
+          libhtml-formattext-withlinks-perl \
+          libpod-coverage-perl \
+          liblocal-lib-perl \
+          cpanminus \
+          graphviz
+      # apparently we can't get this from apt on Ubuntu
+      - name: Install Email::Send from CPAN
+        run: 'cpanm --sudo install Return::Value Email::Send'
+      - name: Get Perl Version and debug info
+        run: '/usr/bin/perl -V'
+      - name: Run tests
+        run: |
+          export PATH="${GITHUB_WORKSPACE}/perl5/bin${PATH:+:${PATH}}"
+          export PERL5LIB="${GITHUB_WORKSPACE}/perl5${PERL5LIB:+:${PERL5LIB}}"
+          /usr/bin/perl runtests.pl
index 2cbee8ef58be95d83100a7c7ecea495288fd3956..8bbe657b36a039ed212eda198107fb2d38997d0a 100644 (file)
@@ -12,7 +12,7 @@
 
 use strict;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Files;
 
index 17593fbe73ed48f79e9953df7dd608b9f0192786..46432662f13e6b6a1b2399c6ba1ca4f50607d2fc 100644 (file)
@@ -12,7 +12,7 @@
 
 use strict;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Files;
 
index 604559dc0bac849825f307890f930a71d302574b..7e4973c35e3e3227c1f17a676a93944a1c8b09f9 100644 (file)
@@ -11,7 +11,7 @@
 
 use strict;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Templates;
 
index 624df69f62e834af19dd451c0df317f1daf4f547..124fbfe7720b1dc746c977d95197a8f880d378c1 100644 (file)
@@ -11,7 +11,7 @@
 
 use strict;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Files;
 use Support::Templates;
index 07cd3ea8c42d77a44365a8aa680f7e04f75f6430..4382e4f9e3938bb68380f9734f91171c7514ec92 100644 (file)
@@ -10,7 +10,7 @@
 #Bugzilla Test 6#
 ####Spelling#####
 
-use lib 't';
+use lib qw(. lib t);
 use Support::Files;
 
 BEGIN { # yes the indenting is off, deal with it
index 495102ffa9d9103649f8823261f745bd5da29b59..f3c25f076a338928d316c6a3a1c14a24afc31a08 100644 (file)
@@ -9,7 +9,7 @@
 #Bugzilla Test 7#
 #####Util.pm#####
 
-use lib 't';
+use lib qw(. lib t);
 use Support::Files;
 use Test::More tests => 17;
 use DateTime;
index 66262655c96d6880f310dae406f9186b877fc49e..a31f5d65d0251a0a2244d69941f934c8cc7312d6 100644 (file)
@@ -17,7 +17,7 @@
 
 use strict;
 
-use lib 't';
+use lib qw(. t lib);
 
 use Support::Files;
 use Support::Templates;
index d84688a7ed72577b21f129ee8f8f5b19e2d1f09a..a6402d3df9dbf98d21a0392daf0e6c724d49a4e1 100644 (file)
@@ -66,7 +66,7 @@ foreach my $module (keys %mods) {
             $used =~ s#/#::#g;
             $used =~ s#\.pm$##;
             $used =~ s#\$module#[^:]+#;
-            $used =~ s#\${[^}]+}#[^:]+#;
+            $used =~ s#\$\{[^}]+\}#[^:]+#;
             $used =~ s#[" ]##g;
             push(@use, grep(/^\Q$used\E$/, keys %mods));
         }
index c638dbcdedf0d1b2568e1ec8cd6e4eeb949b1752..c3b20b65090a20dffb501c8820b508570a3ccc28 100644 (file)
@@ -12,7 +12,7 @@
 
 use strict;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Files;
 use Pod::Checker;