From f6ef6cdc19854e57827b2b817b170f5852a03fa5 Mon Sep 17 00:00:00 2001 From: Joe Cooper Date: Thu, 24 Aug 2017 18:11:56 -0500 Subject: [PATCH 1/3] Travis CI for running tests --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c4dc0a3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +before_install: +- sudo apt-get update -qq +- sudo apt-get install -qq perl libtest-strict-perl +script: prove From fcbc5017eacef026f422d40e9e5d40be3b68d678 Mon Sep 17 00:00:00 2001 From: Joe Cooper Date: Thu, 24 Aug 2017 18:13:15 -0500 Subject: [PATCH 2/3] Add Travis CI status badge --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 2691376..f4b3b37 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/virtualmin/virtualmin-awstats.svg?branch=master)](https://travis-ci.org/virtualmin/virtualmin-awstats) + # virtualmin-awstats Virtualmin plugin to manage AWstats analytics and provide a UI for domain owners to view their own reports From 6228d777bb1a65bcac5fade8ba7d01b7eecde795 Mon Sep 17 00:00:00 2001 From: Joe Cooper Date: Thu, 24 Aug 2017 18:26:18 -0500 Subject: [PATCH 3/3] Do it all with one test file --- t/all_ok.t | 6 ++++++ t/awstats-syntax.t | 5 ----- t/cgi_args-syntax.t | 5 ----- t/config-syntax.t | 5 ----- t/config_save-syntax.t | 5 ----- t/edit-syntax.t | 5 ----- t/generate-syntax.t | 5 ----- t/icon-syntax.t | 5 ----- t/index-syntax.t | 5 ----- t/run-all-awstats-syntax.t | 5 ----- t/save-syntax.t | 5 ----- t/view-syntax.t | 5 ----- t/virtual_feature-syntax.t | 5 ----- t/virtualmin-awstats-lib-syntax.t | 5 ----- 14 files changed, 6 insertions(+), 65 deletions(-) create mode 100644 t/all_ok.t delete mode 100644 t/awstats-syntax.t delete mode 100644 t/cgi_args-syntax.t delete mode 100644 t/config-syntax.t delete mode 100644 t/config_save-syntax.t delete mode 100644 t/edit-syntax.t delete mode 100644 t/generate-syntax.t delete mode 100644 t/icon-syntax.t delete mode 100644 t/index-syntax.t delete mode 100644 t/run-all-awstats-syntax.t delete mode 100644 t/save-syntax.t delete mode 100644 t/view-syntax.t delete mode 100644 t/virtual_feature-syntax.t delete mode 100644 t/virtualmin-awstats-lib-syntax.t diff --git a/t/all_ok.t b/t/all_ok.t new file mode 100644 index 0000000..1dcc3df --- /dev/null +++ b/t/all_ok.t @@ -0,0 +1,6 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::Strict 'no_plan'; + +all_perl_files_ok(); diff --git a/t/awstats-syntax.t b/t/awstats-syntax.t deleted file mode 100644 index af686b9..0000000 --- a/t/awstats-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'awstats.pl' ); -strict_ok( 'awstats.pl' ); -warnings_ok( 'awstats.pl' ); diff --git a/t/cgi_args-syntax.t b/t/cgi_args-syntax.t deleted file mode 100644 index e18fa74..0000000 --- a/t/cgi_args-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'cgi_args.pl' ); -strict_ok( 'cgi_args.pl' ); -warnings_ok( 'cgi_args.pl' ); diff --git a/t/config-syntax.t b/t/config-syntax.t deleted file mode 100644 index 6944fd7..0000000 --- a/t/config-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'config.cgi' ); -strict_ok( 'config.cgi' ); -warnings_ok( 'config.cgi' ); diff --git a/t/config_save-syntax.t b/t/config_save-syntax.t deleted file mode 100644 index 801e01d..0000000 --- a/t/config_save-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'config_save.cgi' ); -strict_ok( 'config_save.cgi' ); -warnings_ok( 'config_save.cgi' ); diff --git a/t/edit-syntax.t b/t/edit-syntax.t deleted file mode 100644 index 9cfc6c9b..0000000 --- a/t/edit-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'edit.cgi' ); -strict_ok( 'edit.cgi' ); -warnings_ok( 'edit.cgi' ); diff --git a/t/generate-syntax.t b/t/generate-syntax.t deleted file mode 100644 index a4a18f6..0000000 --- a/t/generate-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'generate.cgi' ); -strict_ok( 'generate.cgi' ); -warnings_ok( 'generate.cgi' ); diff --git a/t/icon-syntax.t b/t/icon-syntax.t deleted file mode 100644 index 2450958..0000000 --- a/t/icon-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'icon.cgi' ); -strict_ok( 'icon.cgi' ); -warnings_ok( 'icon.cgi' ); diff --git a/t/index-syntax.t b/t/index-syntax.t deleted file mode 100644 index 7a1bbba..0000000 --- a/t/index-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'index.cgi' ); -strict_ok( 'index.cgi' ); -warnings_ok( 'index.cgi' ); diff --git a/t/run-all-awstats-syntax.t b/t/run-all-awstats-syntax.t deleted file mode 100644 index cd42823..0000000 --- a/t/run-all-awstats-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'run-all-awstats.pl' ); -strict_ok( 'run-all-awstats.pl' ); -warnings_ok( 'run-all-awstats.pl' ); diff --git a/t/save-syntax.t b/t/save-syntax.t deleted file mode 100644 index 9d9586e..0000000 --- a/t/save-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'save.cgi' ); -strict_ok( 'save.cgi' ); -warnings_ok( 'save.cgi' ); diff --git a/t/view-syntax.t b/t/view-syntax.t deleted file mode 100644 index 51d76df..0000000 --- a/t/view-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'view.cgi' ); -strict_ok( 'view.cgi' ); -warnings_ok( 'view.cgi' ); diff --git a/t/virtual_feature-syntax.t b/t/virtual_feature-syntax.t deleted file mode 100644 index 0825ca8..0000000 --- a/t/virtual_feature-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'virtual_feature.pl' ); -strict_ok( 'virtual_feature.pl' ); -warnings_ok( 'virtual_feature.pl' ); diff --git a/t/virtualmin-awstats-lib-syntax.t b/t/virtualmin-awstats-lib-syntax.t deleted file mode 100644 index dcc7c19..0000000 --- a/t/virtualmin-awstats-lib-syntax.t +++ /dev/null @@ -1,5 +0,0 @@ -use Test::Strict tests => 3; # last test to print - -syntax_ok( 'virtualmin-awstats-lib.pl' ); -strict_ok( 'virtualmin-awstats-lib.pl' ); -warnings_ok( 'virtualmin-awstats-lib.pl' );