support #32 #63
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
# Build | |
name: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
name: R ${{ matrix.config.r }} | GeoNetwork ${{ matrix.config.geonetwork }} | ${{ matrix.config.os }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
matrix: | |
config: | |
- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '4.0.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '3.12.1', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '3.10.7', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '3.8.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '3.6.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '3.4.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '3.2.2', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '3.0.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
#- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '2.10.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
#- {os: ubuntu-20.04, r: '4.0.5', geonetwork: '2.6.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} | |
env: | |
GN_VERSION: ${{ matrix.config.geonetwork }} | |
steps: | |
- uses: actions/checkout@v2 | |
#Geonetwork set-up - depending on version | |
#Docker GeoNetwork set-up (4.0) | |
- name: Set up GeoNetwork 4 (${{ matrix.config.geonetwork }}) | |
if: ${{ startsWith( matrix.config.geonetwork, '4') }} | |
run: | | |
docker network create elasticnetwork | |
docker run -d --name elasticsearch --net elasticnetwork --add-host host.docker.internal:host-gateway -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" elasticsearch:7.9.2 | |
docker run --add-host host.docker.internal:host-gateway -e ES_HOST=host.docker.internal --net elasticnetwork --name geonetwork -d -p 8080:8080 geonetwork | |
#Docker GeoNetwork set-up (3.2 <= GN < 4) | |
- name: Set up GeoNetwork < 4 (${{ matrix.config.geonetwork }}) | |
if: ${{ startsWith( matrix.config.geonetwork, '3') && !startsWith( matrix.config.geonetwork, '3.0') }} | |
run: | | |
docker run -v $GITHUB_WORKSPACE/tests/resources/config-view-service-override.xml:/etc/geonetwork/config-view-service-override.xml \ | |
-d -p "8080:8080" \ | |
geonetwork:${{ matrix.config.geonetwork }} \ | |
bash -c 'export CATALINA_OPTS="$CATALINA_OPTS -Dgeonetwork.jeeves.configuration.overrides.file=/etc/geonetwork/config-view-service-override.xml";/entrypoint.sh catalina.sh run' | |
#Docker GeoNetwork set-up (GN = 3.0.x) | |
- name: Set up GeoNetwork 3.0.x (${{ matrix.config.geonetwork }}) | |
if: ${{ startsWith( matrix.config.geonetwork, '3.0') }} | |
run: | | |
docker run --name geonetwork -d -p 8080:8080 pobsteta/docker-geonetwork:3.0.5 | |
#Docker GeoNetwork set-up (GN = 2.10.x) | |
#- name: Set up GeoNetwork 2.10.x (${{ matrix.config.geonetwork }}) | |
# if: ${{ startsWith( matrix.config.geonetwork, '2.10')}} | |
# run: | | |
# docker run -v $GITHUB_WORKSPACE/tests/resources/config-view-service-override-legacy.xml:/etc/geonetwork/config-view-service-override.xml \ | |
# -d -p "8080:8080" \ | |
# juanluisrp/geonetwork-legacy:${{ matrix.config.geonetwork }} \ | |
# bash -c 'export CATALINA_OPTS="$CATALINA_OPTS -Dgeonetwork.jeeves.configuration.overrides.file=/etc/geonetwork/config-view-service-override.xml";/entrypoint.sh catalina.sh run' | |
#Docker GeoNetwork set-up (GN = 2.6.x) | |
#- name: Set up GeoNetwork 2.6.x (${{ matrix.config.geonetwork }}) | |
# if: ${{ startsWith( matrix.config.geonetwork, '2.6')}} | |
# run: | | |
# docker run -v $GITHUB_WORKSPACE/tests/resources/config-view-service-override-legacy.xml:/etc/geonetwork/config-view-service-override.xml \ | |
# -d -p "8080:8080" \ | |
# juanluisrp/geonetwork-legacy:${{ matrix.config.geonetwork }} \ | |
# bash -c 'export CATALINA_OPTS="$CATALINA_OPTS -Dgeonetwork.jeeves.configuration.overrides.file=/etc/geonetwork/config-view-service-override.xml";/entrypoint.sh catalina.sh run' | |
#Setup R | |
- name: Set up R ${{ matrix.config.r }} | |
uses: r-lib/actions/setup-r@v1 | |
with: | |
r-version: ${{ matrix.config.r }} | |
#Install dependencies | |
- name: Install dependencies | |
uses: r-lib/actions/setup-r-dependencies@v1 | |
#Check R Package | |
- name: Check R package | |
uses: r-lib/actions/check-r-package@check-r-package | |
with: | |
artifact-name: geonapi_r-${{ matrix.config.r }}_geonetwork-${{matrix.config.geonetwork}}_${{ matrix.config.os }}-results |