62 lines
1.9 KiB
YAML
62 lines
1.9 KiB
YAML
# @file
|
|
# .travis.yml - PKP Plugins Integration
|
|
|
|
dist: focal
|
|
os: linux
|
|
language: php
|
|
|
|
addons:
|
|
chrome: beta
|
|
postgresql: "9.5"
|
|
apt:
|
|
update: true
|
|
packages:
|
|
- libvulkan1
|
|
- libu2f-udev
|
|
|
|
sudo: required
|
|
|
|
php:
|
|
- 8.1.0
|
|
- 8.2.0
|
|
|
|
env:
|
|
- APPLICATION=ojs BRANCH=stable-3_4_0 TEST=mysql DBTYPE=MySQL
|
|
- APPLICATION=ojs BRANCH=stable-3_4_0 TEST=pgsql DBTYPE=PostgreSQL
|
|
- APPLICATION=omp BRANCH=stable-3_4_0 TEST=mysql DBTYPE=MySQL
|
|
- APPLICATION=omp BRANCH=stable-3_4_0 TEST=pgsql DBTYPE=PostgreSQL
|
|
- APPLICATION=ops BRANCH=stable-3_4_0 TEST=mysql DBTYPE=MySQL
|
|
- APPLICATION=ops BRANCH=stable-3_4_0 TEST=pgsql DBTYPE=PostgreSQL
|
|
|
|
install:
|
|
# Prepare OJS/OMP/OPS environment
|
|
- git clone -b ${BRANCH} https://github.com/pkp/${APPLICATION} ~/${APPLICATION}
|
|
- cd ~/${APPLICATION}
|
|
- git submodule update --init --recursive
|
|
# Grab a ready dataset
|
|
- git clone -b main https://github.com/pkp/datasets ~/datasets
|
|
# Setup environment variables
|
|
- source lib/pkp/tools/travis/prepare-tests.sh
|
|
# The script below requires these extra variables
|
|
- export DBTYPE_SYMBOLIC=${TEST}
|
|
- export APP=${APPLICATION}
|
|
# Load the database/files from the dataset
|
|
- ../datasets/tools/load.sh
|
|
# Undo configuration update from the load.sh
|
|
- sed -i -e "s/^name = ${APP}-${BRANCH}$/name = ${APP}-ci/" config.inc.php
|
|
# Start the server
|
|
- lib/pkp/tools/travis/prepare-webserver.sh
|
|
# Build/install dependencies
|
|
- lib/pkp/tools/travis/install-composer-dependencies.sh
|
|
- npm i g -npm && npm install --silent && npm run build
|
|
- rm -rf ~/${APPLICATION}/plugins/generic/webFeed
|
|
- ln -s ${TRAVIS_BUILD_DIR} ~/${APPLICATION}/plugins/generic/webFeed
|
|
|
|
script:
|
|
- $(npm bin)/cypress run --headless --browser chrome --config '{"specPattern":["plugins/generic/webFeed/cypress/tests/functional/*.cy.{js,jsx,ts,tsx}"]}'
|
|
|
|
after_failure:
|
|
- cat error.log
|
|
- sudo apt-get install sharutils
|
|
- tar cz cypress/screenshots | uuencode /dev/stdout
|