Commit 1c2bfeca authored by Muhammad Kaisar Arkhan's avatar Muhammad Kaisar Arkhan 🔫

Setup CI

parent d09680b1
Pipeline #36961964 failed with stage
in 60 minutes and 1 second
# GitLab CI Configuration
# Definitions:
# - pure : Non-multilib environment
# - multilib : Multilib environment without convertpkg
# - convertpkg : Multilib environment with convertpkg
# YAML Templates for tests
# ========================
# Offline tests
# -------------
.test:template:offline:pure: &test_template_offline_pure
before_script:
- echo "TEST_ONLINE=$TEST_ONLINE, TEST_INSTALL=$TEST_INSTALL, TEST_MUTLILIB=$TEST_MULTILIB"
- perl -v
- bash ./t/travis-deps/install.sh
- cpanm Text::Diff Capture::Tiny Test::Output Devel::Cover Test::Exit
script:
- "PERL5OPT='-MDevel::Cover=-coverage,statement,branch,condition,path,subroutine,+ignore,t/,+ignore,prove,dbprove' prove -v t/*.t"
variables:
TEST_ONLINE: 0
TEST_INSTALL: 1
TEST_MULTILIB: 0
TRAVIS: 'true' # TODO: Replace the tests with proper GitLab CI checks
.test:template:offline:multilib: &test_template_offline_multilib
<<: *test_template_offline_pure
variables:
TEST_ONLINE: 0
TEST_INSTALL: 1
TEST_MULTILIB: 1
TRAVIS: 'true' # TODO: Replace the tests with proper GitLab CI checks
.test:template:offline:convertpkg: &test_template_offline_convertpkg
<<: *test_template_offline_pure
variables:
TEST_ONLINE: 0
TEST_INSTALL: 1
TEST_MULTILIB: 2
TRAVIS: 'true' # TODO: Replace the tests with proper GitLab CI checks
# Online tests
# ------------
.test:template:online:pure: &test_template_online_pure
<<: *test_template_offline_pure
variables:
TEST_ONLINE: 1
TEST_INSTALL: 1
TEST_MULTILIB: 0
TRAVIS: 'true'
.test:template:online:multilib: &test_template_online_multilib
<<: *test_template_offline_pure
variables:
TEST_ONLINE: 1
TEST_INSTALL: 1
TEST_MULTILIB: 1
TRAVIS: 'true' # TODO: Replace the tests with proper GitLab CI checks
.test:template:online:convertpkg: &test_template_online_convertpkg
<<: *test_template_offline_pure
variables:
TEST_ONLINE: 1
TEST_INSTALL: 1
TEST_MULTILIB: 2
TRAVIS: 'true' # TODO: Replace the tests with proper GitLab CI checks
# Stages
# ======
stages:
- test
- package
# Tests
# =====
# Latest Perl
# -----------
test:latest:offline:pure:
image: perl:latest
<<: *test_template_offline_pure
test:latest:offline:multilib:
image: perl:latest
<<: *test_template_offline_multilib
test:latest:offline:convertpkg:
image: perl:latest
<<: *test_template_offline_convertpkg
test:latest:online:pure:
image: perl:latest
<<: *test_template_online_pure
test:latest:online:multilib:
image: perl:latest
<<: *test_template_online_multilib
test:latest:online:convertpkg:
image: perl:latest
<<: *test_template_online_convertpkg
language: perl
perl:
- "5.26"
- "5.22"
- "5.18"
- "5.16"
env:
- TEST_ONLINE=1 TEST_INSTALL=1 TEST_MULTILIB=0
- TEST_ONLINE=1 TEST_INSTALL=1 TEST_MULTILIB=1
- TEST_ONLINE=1 TEST_INSTALL=1 TEST_MULTILIB=2
- TEST_ONLINE=0 TEST_INSTALL=1 TEST_MULTILIB=0
- TEST_ONLINE=0 TEST_INSTALL=1 TEST_MULTILIB=1
- TEST_ONLINE=0 TEST_INSTALL=1 TEST_MULTILIB=2
sudo: required
install:
- sudo bash t/travis-deps/install.sh
- cpanm Text::Diff Capture::Tiny Test::Output Devel::Cover Test::Exit
script:
- bash -c '
PROVE=`which prove`;
sudo
PERL5OPT=-MDevel::Cover=-coverage,statement,branch,condition,path,subroutine,+ignore,t/,+ignore,prove,db,/home/travis/build/pink-mist/sbotools/cover_db
$PROVE -v t/*.t;'
- sudo chmod -R a+x cover_db;
tar cvf cover_db.tar cover_db
addons:
artifacts:
paths: "./cover_db.tar"
notifications:
irc:
channels:
- "chat.freenode.net#sbotools"
on_success: change
on_failure: change
......@@ -17,6 +17,6 @@ then
touch /etc/profile.d/32dev.sh
cp -a t/travis-deps/convertpkg-compat32 /usr/sbin
fi
git config --global user.email "sbotools@travis.ci"
git config --global user.name "Travis CI"
git config --global user.email "sbotools@gitlab.com"
git config --global user.name "GitLab CI"
echo "travis-deps/install.sh: Done.";
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment