Skip to content

Commit

Permalink
Merge pull request #47 from withanage/main-github-actions
Browse files Browse the repository at this point in the history
Add github actions support for main
  • Loading branch information
withanage authored Jul 31, 2024
2 parents 2974473 + f2e735d commit 4879206
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 65 deletions.
25 changes: 25 additions & 0 deletions .github/actions/tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/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
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
on: [push]
name: oaiJats
jobs:
oaiJats:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- application: ojs
php-version: 8.3
database: mysql
- application: ojs
php-version: 8.2
database: mysql
- application: ojs
php-version: 8.3
database: pgsql
- application: ojs
php-version: 8.2
database: pgsql
name: oaiJats
steps:
- uses: pkp/pkp-github-actions@v1
with:
node_version: 20
branch: main
repository: pkp
plugin: true
dataset_inject: true
65 changes: 0 additions & 65 deletions .travis.yml

This file was deleted.

0 comments on commit 4879206

Please sign in to comment.