-
Notifications
You must be signed in to change notification settings - Fork 14
83 lines (77 loc) · 3.18 KB
/
r-cmd-check.yml
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# Build
name: Build
on:
push:
branches: [ master ]
paths-ignore:
- '/doc'
- '**/README.md'
pull_request:
branches: [ master ]
paths-ignore:
- '/doc'
- '**.md'
jobs:
build:
name: R ${{ matrix.config.r }} | ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- {os: ubuntu-latest, r: 'release'}
env:
PKG_SYSREQS: false
INSPIRE_API_ENDPOINT: ${{ secrets.INSPIRE_API_ENDPOINT }}
INSPIRE_API_KEY: ${{ secrets.INSPIRE_API_KEY }}
ZENODO_SANDBOX_TOKEN: ${{ secrets.ZENODO_SANDBOX_TOKEN }}
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-pandoc@v2
#SDI integration tests
#-------------------------
#Docker Geoserver set-up
- name: Set up GeoServer (latest)
run: |
docker pull kartoza/postgis
docker run -d --name="postgis" kartoza/postgis
docker run --name="geoserver" --link postgis:postgis -d -p 8080:8080 oscarfonts/geoserver:latest
#Docker GeoNetwork set-up
- name: Set up GeoNetwork (latest)
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 8181:8080 geonetwork
#Docker PyCSW set-up
- name: Set up PyCSW (latest)
run: |
docker pull geopython/pycsw:latest
docker run --name pycsw -v $GITHUB_WORKSPACE/tests/resources/pycsw/pycsw.cfg:/etc/pycsw/pycsw.cfg -d -p 8000:8000 geopython/pycsw:latest
#R tests
#--------------------------
#- name: dependencies on Linux
# if: runner.os == 'Linux'
# run: sudo apt-get install -y make libicu-dev libxml2-dev libssl-dev pandoc librdf0-dev libnode-dev libcurl4-gnutls-dev
#R Set-up
- name: Set up R ${{ matrix.config.r }}
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
#Install dependencies
#Install dependencies on Linux
- name: Install dependencies on Linux
if: runner.os == 'Linux'
run: sudo apt-get install -y make libsodium-dev libicu-dev libxml2-dev libssl-dev pandoc librdf0-dev libnode-dev libcurl4-gnutls-dev libmysqlclient-dev libpq-dev libcurl4-openssl-dev zlib1g-dev make libjq-dev libsecret-1-dev libnetcdf-dev libpng-dev libgdal-dev gdal-bin libgeos-dev libproj-dev libsqlite3-dev libudunits2-dev
- name: Install dependencies
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::XML
needs: check
#Check R Package
- name: Check R package
uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
artifact-name: geoflow_r-${{ matrix.config.r }}_${{ matrix.config.os }}-results