Skip to content

Merge pull request #16 from ubtue/riedl #38

Merge pull request #16 from ubtue/riedl

Merge pull request #16 from ubtue/riedl #38

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
run-tests:
name: Tests with Java ${{ matrix.java-version }}
runs-on: ubuntu-latest
strategy:
matrix:
java-version: ['11']
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: intl, xsl
tools: composer:2
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: adopt
java-version: ${{ matrix.java-version }}
- name: Checkout
uses: actions/checkout@v3
- name: Set up VuFind environment
run: |
echo VUFIND_HOME=~/vufind >> $GITHUB_ENV
echo VUFIND_LOCAL_DIR=$VUFIND_HOME/local >> $GITHUB_ENV
- name: Cache VuFind data
uses: actions/cache@v3
with:
path: ~/vufind
key: "vufind-${{ github.sha }}"
restore-keys: "vufind-"
- name: Download and Setup VuFind
run: |
if [ ! -d $VUFIND_HOME/.git ]; then git clone https://github.com/vufind-org/vufind.git $VUFIND_HOME; fi;
cd $VUFIND_HOME
git pull
composer install
- name: Create Test Index
run: |
cd $VUFIND_HOME
$VUFIND_HOME/solr.sh start
$VUFIND_HOME/import-marc-auth.sh $VUFIND_HOME/tests/data/authority/authorityauth.mrc marc_auth_ils.properties
$VUFIND_HOME/import-marc.sh $VUFIND_HOME/tests/data/authoritybibs.mrc
$VUFIND_HOME/index-alphabetic-browse.sh
$VUFIND_HOME/solr.sh stop
- name: Run Tests
run: ant test -Dvufind.dir=$VUFIND_HOME
- name: Clean Up
run: cd $VUFIND_HOME ; rm -rf solr/vufind ; rm import/*.log ; git reset --hard