You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
2.1 KiB
44 lines
2.1 KiB
language: php
|
|
|
|
services:
|
|
# wp-publications is a Wordpress plugin, wordpress requires mysql
|
|
- mysql
|
|
|
|
# doc at https://docs.travis-ci.com/user/languages/php/
|
|
php:
|
|
- '7.4' # release 28 November 2019
|
|
- '8.0' # release Nov 2020
|
|
- '8.1' # release Nov 2021
|
|
- '8.2' # release Nov 2022
|
|
- '8.3' # release Nov 2023
|
|
|
|
script:
|
|
- curl -L -o reflectivedoc.php https://www.monperrus.net/martin/reflectivedoc.php.txt
|
|
- curl -L -o gakowiki-syntax.php https://www.monperrus.net/martin/gakowiki-syntax.php.txt
|
|
- phpunit BibtexbrowserTest.php
|
|
|
|
# now testing this version of bibtexbrowser with wp-publications
|
|
# Installing WP-CLI
|
|
- curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
|
|
- chmod 755 wp-cli.phar
|
|
- WPCLI=/tmp/wp
|
|
- mv wp-cli.phar $WPCLI
|
|
# Installing wordpress with wp-cli
|
|
- $WPCLI core download
|
|
- mysql -u travis -e "CREATE DATABASE IF NOT EXISTS wp"
|
|
- $WPCLI config create --dbname=wp --dbuser=travis
|
|
- $WPCLI core install --url=http://bibtexbrowser.com --title="bibtexbrowser wordpress" --admin_user=root --admin_email=martin.monperrus@gnieh.org
|
|
# installing wp-cli/restful, which is required to render shortcodes with wp-cli
|
|
- $WPCLI package install wp-cli/restful
|
|
- $WPCLI core version
|
|
# installing plugin wp-publications
|
|
- $WPCLI plugin install https://github.com/monperrus/wp-publications/archive/refs/heads/master.zip --activate
|
|
# there is no need to create a post, because one activation task of wp-publications is to create a fake post
|
|
#- $WPCLI post create --post_title=test --post_content='[wp-publications bib="sample.bib" all=true]'
|
|
- cp bibtexbrowser.php ./wp-content/plugins/wp-publications/
|
|
- echo "<?php define('BIBTEXBROWSER_USE_PROGRESSIVE_ENHANCEMENT',false);?>" > ./wp-content/plugins/wp-publications/bibtexbrowser.local.php
|
|
- $WPCLI rest post list --slug=wp-publications-example --field=content | tee before.txt
|
|
# do we still have the reference output? (useful for detecting changes in Wordpress or WP-CLI) (diff exits with 1 if there is a difference)
|
|
- diff reference-output-wp-publications.txt before.txt
|
|
|
|
sudo: false
|