Fix GitHub Actions by updating outdated versions. (#50) #98
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |