diff --git a/.Rbuildignore b/.Rbuildignore index 1545323..4eef409 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,8 +1,9 @@ ^.*\.Rproj$ ^\.Rproj\.user$ -.travis.yml ^\.git$ ^.*\.zenodo.json$ ^CRAN-RELEASE$ ^cran-comments\.md$ ^\.buildlibrary$ +^\.github$ +^codecov\.yml$ diff --git a/.buildlibrary b/.buildlibrary index 0c75fc8..cbd527d 100644 --- a/.buildlibrary +++ b/.buildlibrary @@ -1,6 +1,7 @@ -ValidationKey: '1113300' +ValidationKey: '1135759' AcceptedWarnings: - 'Warning: package ''.*'' was built under R version' - 'Warning: namespace ''.*'' is not available and has been replaced' AcceptedNotes: unable to verify current time AutocreateReadme: yes +UseGithubActions: yes diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/test-buildlibrary.yaml b/.github/workflows/test-buildlibrary.yaml new file mode 100644 index 0000000..db67aa6 --- /dev/null +++ b/.github/workflows/test-buildlibrary.yaml @@ -0,0 +1,58 @@ +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + +name: check + +jobs: + check: + runs-on: ubuntu-20.04 + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + + - uses: r-lib/actions/setup-r@v1 + + - uses: r-lib/actions/setup-pandoc@v1 + + - name: Install dependencies + run: | + sudo apt-get install libcurl4-openssl-dev libgit2-dev + + - name: Query dependencies + run: | + install.packages('remotes') + saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) + writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") + shell: Rscript {0} + + - name: Cache R packages + uses: actions/cache@v2 + with: + path: ${{ env.R_LIBS_USER }} + key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- + + - name: Install R dependencies + run: | + repos <- c("https://cloud.r-project.org","https://rse.pik-potsdam.de/r/packages/") + install.packages(c("remotes"), repos=repos) + remotes::install_deps(dependencies = TRUE, repos=repos) + remotes::install_cran(c("covr","lucode2"), repos=repos) + shell: Rscript {0} + + - name: Test coverage + run: covr::codecov() + shell: Rscript {0} + + - name: Validation key + run: if(!lucode2:::validkey()$valid) stop("Invalid build key!") + shell: Rscript {0} + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3fa150f..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r - -language: r -os: linux -dist: xenial -repos: - CRAN: https://cloud.r-project.org - PIK: https://rse.pik-potsdam.de/r/packages/ -cache: packages -latex: false -pandoc: false -r_packages: - - devtools - - testthat - - lucode2 -script: - - Rscript -e 'devtools::test()' -after_success: - - Rscript -e 'covr::codecov()' diff --git a/.zenodo.json b/.zenodo.json index 4b9dff2..c9d47fa 100644 --- a/.zenodo.json +++ b/.zenodo.json @@ -1,6 +1,6 @@ { "title": "gms: 'GAMS' Modularization Support Package", - "version": "0.6.0", + "version": "0.6.1", "description": "
A collection of tools to create, use and maintain modularized model code written in the modeling \n language 'GAMS' (