From bb91e2412661cd6840c9c63ffde3c1b36db6315a Mon Sep 17 00:00:00 2001 From: Marsel Scheer Date: Sun, 7 Mar 2021 18:55:42 +0100 Subject: [PATCH 1/9] Create r.yml --- .github/workflows/r.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/r.yml diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml new file mode 100644 index 0000000..8a744ad --- /dev/null +++ b/.github/workflows/r.yml @@ -0,0 +1,37 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# +# See https://github.com/r-lib/actions/tree/master/examples#readme for +# additional example workflows available for the R community. + +name: R + +on: + push: + branches: [ master ] + pull_request: + branches: [ master, development ] + +jobs: + build: + runs-on: macOS-latest + strategy: + matrix: + r-version: [3.6, 4.0] + + steps: + - uses: actions/checkout@v2 + - name: Set up R ${{ matrix.r-version }} + uses: r-lib/actions/setup-r@ffe45a39586f073cc2e9af79c4ba563b657dc6e3 + with: + r-version: ${{ matrix.r-version }} + - name: Install dependencies + run: | + install.packages(c("remotes", "rcmdcheck")) + remotes::install_deps(dependencies = TRUE) + shell: Rscript {0} + - name: Check + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + shell: Rscript {0} From 6bd95e8156756a63c7aeb7cfe117e3e26067a812 Mon Sep 17 00:00:00 2001 From: Marsel Scheer Date: Sun, 7 Mar 2021 18:59:13 +0100 Subject: [PATCH 2/9] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 8a744ad..cae2d67 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -16,7 +16,7 @@ on: jobs: build: - runs-on: macOS-latest + runs-on: ubuntu-latest strategy: matrix: r-version: [3.6, 4.0] From b48c3ec6af1003941a59a5f41daef070aff0528a Mon Sep 17 00:00:00 2001 From: Marsel Scheer Date: Sun, 7 Mar 2021 19:01:04 +0100 Subject: [PATCH 3/9] Update r.yml --- .github/workflows/r.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index cae2d67..4175d47 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -24,7 +24,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Set up R ${{ matrix.r-version }} - uses: r-lib/actions/setup-r@ffe45a39586f073cc2e9af79c4ba563b657dc6e3 + uses: r-lib/actions/setup-r@v1 with: r-version: ${{ matrix.r-version }} - name: Install dependencies From 3082e6261dd1d9581fa3f158770b17048388677b Mon Sep 17 00:00:00 2001 From: Marsel Scheer Date: Sun, 7 Mar 2021 19:14:20 +0100 Subject: [PATCH 4/9] Update r.yml --- .github/workflows/r.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 4175d47..f4a8a1d 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -29,9 +29,9 @@ jobs: r-version: ${{ matrix.r-version }} - name: Install dependencies run: | - install.packages(c("remotes", "rcmdcheck")) + install.packages(c("remotes", "covr")) remotes::install_deps(dependencies = TRUE) shell: Rscript {0} - name: Check - run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + run: covr::codecov()#rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") shell: Rscript {0} From dc443f463c85ac8f27ac68e4e7e30b9c98c07ede Mon Sep 17 00:00:00 2001 From: Marsel Scheer Date: Sun, 7 Mar 2021 19:31:27 +0100 Subject: [PATCH 5/9] Update r.yml --- .github/workflows/r.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index f4a8a1d..cd081ff 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - r-version: [3.6, 4.0] + r-version: [4.0] steps: - uses: actions/checkout@v2 @@ -29,9 +29,11 @@ jobs: r-version: ${{ matrix.r-version }} - name: Install dependencies run: | - install.packages(c("remotes", "covr")) + install.packages(c("remotes")) remotes::install_deps(dependencies = TRUE) shell: Rscript {0} - name: Check - run: covr::codecov()#rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + run: | + install.packages(c("covr")) + covr::codecov()#rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") shell: Rscript {0} From 4d69681c69b96b5d56e40ccc1a5506d43907eb8c Mon Sep 17 00:00:00 2001 From: Marsel Scheer Date: Sun, 7 Mar 2021 20:21:43 +0100 Subject: [PATCH 6/9] Update r.yml --- .github/workflows/r.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index cd081ff..cc2b86b 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -23,6 +23,8 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Install linux libs + run: sudo apt-get install -y libcurl4-openssl-dev - name: Set up R ${{ matrix.r-version }} uses: r-lib/actions/setup-r@v1 with: From ed50ef7e3734e06e6ae68151870c9a236b96c9b7 Mon Sep 17 00:00:00 2001 From: Marsel Scheer Date: Sun, 7 Mar 2021 20:42:57 +0100 Subject: [PATCH 7/9] Update r.yml --- .github/workflows/r.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index cc2b86b..626da5a 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -31,11 +31,9 @@ jobs: r-version: ${{ matrix.r-version }} - name: Install dependencies run: | - install.packages(c("remotes")) + install.packages(c("remotes", "covr")) remotes::install_deps(dependencies = TRUE) shell: Rscript {0} - name: Check - run: | - install.packages(c("covr")) - covr::codecov()#rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + run: covr::codecov()#rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") shell: Rscript {0} From 999a238b3ffc10ab8e9ce40c69394303d7a53f2a Mon Sep 17 00:00:00 2001 From: Marsel Scheer Date: Wed, 10 Mar 2021 22:01:06 +0100 Subject: [PATCH 8/9] Update r.yml --- .github/workflows/r.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 626da5a..111be03 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -25,15 +25,25 @@ jobs: - uses: actions/checkout@v2 - name: Install linux libs run: sudo apt-get install -y libcurl4-openssl-dev + - name: Set up R ${{ matrix.r-version }} uses: r-lib/actions/setup-r@v1 with: r-version: ${{ matrix.r-version }} - - name: Install dependencies + + - name: Query dependencies run: | install.packages(c("remotes", "covr")) - remotes::install_deps(dependencies = TRUE) + saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) shell: Rscript {0} + + - name: Cache R packages + uses: actions/cache@v1 + with: + path: ${{ env.R_LIBS_USER }} + key: ubuntu-r-4-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ubuntu-r-4 + - name: Check - run: covr::codecov()#rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + run: covr::codecov() shell: Rscript {0} From a666afdb4ed2c0c9b7c5ecad6d952b814daa35aa Mon Sep 17 00:00:00 2001 From: Marsel Scheer Date: Wed, 10 Mar 2021 22:18:53 +0100 Subject: [PATCH 9/9] Update r.yml --- .github/workflows/r.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml index 111be03..2472f74 100644 --- a/.github/workflows/r.yml +++ b/.github/workflows/r.yml @@ -33,7 +33,7 @@ jobs: - name: Query dependencies run: | - install.packages(c("remotes", "covr")) + install.packages("remotes") saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) shell: Rscript {0} @@ -44,6 +44,13 @@ jobs: key: ubuntu-r-4-${{ hashFiles('.github/depends.Rds') }} restore-keys: ubuntu-r-4 + - name: Install dependencies + run: | + install.packages(c("remotes")) + remotes::install_deps(dependencies = TRUE) + remotes::install_cran("covr") + shell: Rscript {0} + - name: Check run: covr::codecov() shell: Rscript {0}