Skip to content
name : Integration Tests
on :
# allow manual triggering
workflow_dispatch:
# for debugging
push:
pull_request:
schedule:
# run Thursday 4:30 AM UTC
- cron: '30 4 * * 4'
env:
R_LIBS_USER: /usr/local/lib/R/site-library
LC_ALL: en_US.UTF-8
NCPUS: 2
PGHOST: postgres
CI: true
jobs:
test:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
R:
- "4.0"
- "4.1"
services:
postgres:
image: mdillon/postgis:9.5
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
container:
image: pecan/depends:R${{ matrix.R }}
steps:
# checkout source code
- name: work around https://github.com/actions/checkout/issues/766
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- uses: actions/checkout@v3
with:
set-safe-directory: false
# install additional tools needed
- name: install utils
run: apt-get update && apt-get install -y postgresql-client qpdf
- name: update dependency lists
run: Rscript scripts/generate_dependencies.R
- name: check for out-of-date dependencies files
uses: infotroph/tree-is-clean@v1
- name: install newly-added dependencies
run: Rscript docker/depends/pecan.depends.R
# initialize database
- name: db setup
uses: docker://pecan/db:ci
- name: add models to db
run: ./scripts/add.models.sh
- name: Install Packages
run: make -j1 install
- name: Run tests
run: |
for FILE in modules/data.atmosphere/inst/integrationTests/*; do
Rscript $FILE;
done