forked from marktriggs/nla-browse-handler
-
Notifications
You must be signed in to change notification settings - Fork 11
62 lines (51 loc) · 1.72 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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.3'
extensions: intl, xsl
tools: composer:2
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: adopt
java-version: ${{ matrix.java-version }}
- name: Checkout
uses: actions/checkout@v4
- 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@v4
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