]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1785938: Make tests work in GHA on 5.0.4 branch (#111)
authorDave Miller <github@justdave.net>
Sat, 10 Sep 2022 20:30:53 +0000 (16:30 -0400)
committerGitHub <noreply@github.com>
Sat, 10 Sep 2022 20:30:53 +0000 (13:30 -0700)
* Add GHA tests on 5.0.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..f05fc42
--- /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.0.4 ]
+  pull_request:
+    branches: [ 5.0.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 \
+          graphviz
+      - name: Get Perl Version and debug info
+        run: '/usr/bin/perl -V'
+      - name: Run tests
+        run: '/usr/bin/perl runtests.pl'
index d1858361f7bfbbc5a5f9bcf5d48e243e69cb4089..8fcd1a343415d50ba37ec2c2e2de6a3955bccbbe 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 443f96415871c6a2219d2029bea881c95e8d6ad4..e1d04bed844dbca61fe2924e648e289ab1aff73b 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 0a6f0e0aadbb4f7633e257547fbdca6a1f2737c8..760d39ac8573194aa7ba211edf1cfaffd3b18fcd 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 b6de8cee391fd47577415ffd72aa34c4e3401d8b..b7f10cae2e6e642710c1259b688701511c32e911 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 24e00242d9280d2e22a0f39c6fcf8caa0fbdcfcb..ea298c5f64204a7c650b51031215a3eb68203b38 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 66c2df032fbbf39835ca4d864fc94423b3cb6f4b..6f5ea8b720c69063a97d54c2a145f4681897e4f0 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 e36651edb2a44b29ae1c61aa0f5d68cd29ffe9eb..5b0bf1f9408c2e44594ca2620e1c50f554da3471 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 afd29a652b790ccc63c705e17eccfe76444ee517..e0e99017210eb6a784127f8ec2dc97f2c25cb65e 100644 (file)
@@ -69,7 +69,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 8a7f374ce6886bf0e1f7b3cc7489e2f46957efd7..fd37faa7c43c9ab81d1f73137a2fb22504f6b202 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;