Skip to content

Commit

Permalink
Merge pull request #48 from withanage/stable-3_4_0-github-actions
Browse files Browse the repository at this point in the history
Add github actions support for stable-3_4_0
  • Loading branch information
withanage authored Jul 31, 2024
2 parents 1a68f9a + bd6d881 commit 4a08926
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 65 deletions.
24 changes: 24 additions & 0 deletions .github/actions/tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

set -e

# Add python libraries
sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev wget libbz2-dev
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt install python3.7
sudo apt-get install python3-lxml xmlstarlet
pip install lxml


git clone -b ${APP_BRANCH} https://github.com/pkp/jatsTemplate plugins/generic/jatsTemplate
php lib/pkp/tools/installPluginVersion.php plugins/generic/jatsTemplate/version.xml
php lib/pkp/tools/installPluginVersion.php plugins/oaiMetadataFormats/oaiJats/version.xml

echo "Run cypress tests"
npx cypress run --config '{"specPattern":["plugins/oaiMetadataFormats/oaiJats/cypress/tests/functional/*.cy.js"]}'
wget -q -O - "http://localhost/index.php/publicknowledge/oai?verb=ListRecords&metadataPrefix=jats" | xmlstarlet sel -N x="https://jats.nlm.nih.gov/publishing/1.1/" -t -c "(//x:article)[1]" > jats.xml
wget -q "https://eruditps.docs.erudit.org/_downloads/f0f9fb861e01a47df2ce48f588524d29/erudit-style-0.3.sch"

echo "Validate against erudit-style"
python3 plugins/oaiMetadataFormats/oaiJats/validate.py jats.xml erudit-style-0.3.sch
38 changes: 38 additions & 0 deletions .github/workflows/stable-3_4_0.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on: [push, pull_request]
name: oaiJats
jobs:
oaiJats:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- application: ojs
php-version: 8.1
database: mysql
- application: ojs
php-version: 8.2
database: mysql
- application: ojs
php-version: 8.2
database: pgsql
- application: ojs
php-version: 8.2
database: pgsql

name: oaiJats
steps:
- uses: pkp/pkp-github-actions@v1
with:
node_version: 16
branch: stable-3_4_0
repository: pkp
plugin: true
dataset_inject: true







65 changes: 0 additions & 65 deletions .travis.yml

This file was deleted.

0 comments on commit 4a08926

Please sign in to comment.