]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1785938: Make tests work in GHA on 5.2 branch (#112)
authorDave Miller <github@justdave.net>
Sat, 10 Sep 2022 20:32:14 +0000 (16:32 -0400)
committerGitHub <noreply@github.com>
Sat, 10 Sep 2022 20:32:14 +0000 (13:32 -0700)
* Add GHA tests on 5.2 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..8f4419c
--- /dev/null
@@ -0,0 +1,74 @@
+# 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: [ 5.2 ]
+  pull_request:
+    branches: [ 5.2 ]
+  # 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 \
+          graphviz
+      - name: Get Perl Version and debug info
+        run: '/usr/bin/perl -V'
+      - name: Run tests
+        run: '/usr/bin/perl runtests.pl'
index 8378492820d52e2b91b6ca9d8eadfb3878a0916c..b61c0ad853aaae8c4de1ca9c9d847a2481095219 100644 (file)
@@ -14,7 +14,7 @@ use 5.10.1;
 use strict;
 use warnings;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Files;
 
index 3cc55f83572aab32b543bfaf9ee947a76f4fd41c..dcad67f1a31f07cf79f026901e9f78db58b7076e 100644 (file)
@@ -14,7 +14,7 @@ use 5.10.1;
 use strict;
 use warnings;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Files;
 
index 938ee8b18b9d10702e6b2490ef13da7d53b91a2b..413c92e420aadacc3b93b7c6dbbcdeb2272f6836 100644 (file)
@@ -13,7 +13,7 @@ use 5.10.1;
 use strict;
 use warnings;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Templates;
 
index ef589e69331165e5c40f114d35d9ec0f58aadc4e..8b013cf89bc27611fefe83def7ad81aea0fb4ce0 100644 (file)
@@ -13,7 +13,7 @@ use 5.10.1;
 use strict;
 use warnings;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Files;
 use Support::Templates;
index ccbd699325b30bab1c9b23eef974ba4ecd675553..cbbb259a0d6134ef8999511f2f210d1ed168ca65 100644 (file)
@@ -14,7 +14,7 @@ use 5.10.1;
 use strict;
 use warnings;
 
-use lib 't';
+use lib qw(. lib t);
 use Support::Files;
 
 # -1 because 006spellcheck.t must not be checked.
index 94f62dfc145cdad18b1a61af15fa3461be2c173a..8d4bae59c7ee68efcbbd2c036cb7a1427f20cb3b 100644 (file)
@@ -13,7 +13,7 @@ use 5.10.1;
 use strict;
 use warnings;
 
-use lib 't';
+use lib qw(. lib t);
 use Support::Files;
 use Test::More tests => 17;
 use DateTime;
index da432e114265790486c736e5585c9260f8d59937..5f4d274dc3d612e9eb507891172c58a687cff81e 100644 (file)
@@ -19,7 +19,7 @@ use 5.10.1;
 use strict;
 use warnings;
 
-use lib 't';
+use lib qw(. t lib);
 
 use Support::Files;
 use Support::Templates;
index b600766b6f55cefc2f0dff1acb3d0b59253b7603..dce928245b608e1e94dd91377eb491d5a34cc104 100644 (file)
@@ -71,7 +71,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 2930ea11231c6f880c01808f8d08e8be54a4fa39..d4a48e9c5ab55a13589396387f3af2fdd2e3da70 100644 (file)
@@ -14,7 +14,7 @@ use 5.10.1;
 use strict;
 use warnings;
 
-use lib 't';
+use lib qw(. lib t);
 
 use Support::Files;
 use Pod::Checker;