From 44f8abf8bcd361254b39c50d964416e17fd278f4 Mon Sep 17 00:00:00 2001 From: Emrah Er Date: Fri, 12 Jul 2024 13:54:07 +0300 Subject: [PATCH] actions update --- .github/workflows/R-CMD-check.yaml | 52 ++++++++++++++++++++++++++++++ .travis.yml | 7 ---- R/cbRt_helper.R | 2 +- README.Rmd | 4 +++ _pkgdown.yml | 0 appveyor.yml | 45 -------------------------- codecov.yml | 12 ------- 7 files changed, 57 insertions(+), 65 deletions(-) create mode 100644 .github/workflows/R-CMD-check.yaml delete mode 100644 .travis.yml delete mode 100644 _pkgdown.yml delete mode 100755 appveyor.yml delete mode 100644 codecov.yml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..0f2fe08 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,52 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check + +permissions: read-all + +jobs: + R-CMD-check: + runs-on: ${{ matrix.config.os }} + + name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + + strategy: + fail-fast: false + matrix: + config: + - {os: macos-latest, r: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - 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 + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 83dbc8b..0000000 --- a/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r - -language: R -sudo: false -cache: packages -after_success: - - Rscript -e 'covr::codecov()' diff --git a/R/cbRt_helper.R b/R/cbRt_helper.R index f76e892..e4611f9 100644 --- a/R/cbRt_helper.R +++ b/R/cbRt_helper.R @@ -6,7 +6,7 @@ # Get Categories---- # -------------------------------------------------------------------------- ### get_categories_info <- function(token = NULL) { - if (is.null(token)) token <- Sys.getenv("EVDS_TOKEN") + if (is.null(token)) CBRTKey <- myCBRTKey <- Sys.getenv("EVDS_TOKEN") urlroot <- "https://evds2.tcmb.gov.tr/service/evds/categories/" url <- paste0(urlroot, "type=json") doc <- cbrt_geturl(url, token = token) diff --git a/README.Rmd b/README.Rmd index 09cb55d..2c028b8 100644 --- a/README.Rmd +++ b/README.Rmd @@ -15,6 +15,10 @@ knitr::opts_chunk$set( # cbRt [![lifecycle](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental) + +[![R-CMD-check](https://github.com/emraher/cbRt/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/emraher/cbRt/actions/workflows/R-CMD-check.yaml) + + ## Disclaimer This software is in no way affiliated, endorsed, or approved by the CBRT. It comes with absolutely no warranty. Also see the [Disclaimer on CBRT webpage](http://www.tcmb.gov.tr/wps/wcm/connect/TCMB+EN/TCMB+EN/Footer+Menu/Disclaimer) since it mentions; **"Information published in this site may be quoted by specific reference thereto, but the use of such information for commercial purposes shall be subject to prior written permission of the CBRT."** diff --git a/_pkgdown.yml b/_pkgdown.yml deleted file mode 100644 index e69de29..0000000 diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100755 index c6c1438..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,45 +0,0 @@ -# DO NOT CHANGE the "init" and "install" sections below - -# Download script file from GitHub -init: - ps: | - $ErrorActionPreference = "Stop" - Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" - Import-Module '..\appveyor-tool.ps1' - -install: - ps: Bootstrap - -cache: - - C:\RLibrary - -# Adapt as necessary starting from here - -build_script: - - travis-tool.sh install_deps - -test_script: - - travis-tool.sh run_tests - -on_failure: - - 7z a failure.zip *.Rcheck\* - - appveyor PushArtifact failure.zip - -artifacts: - - path: '*.Rcheck\**\*.log' - name: Logs - - - path: '*.Rcheck\**\*.out' - name: Logs - - - path: '*.Rcheck\**\*.fail' - name: Logs - - - path: '*.Rcheck\**\*.Rout' - name: Logs - - - path: '\*_*.tar.gz' - name: Bits - - - path: '\*_*.zip' - name: Bits diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 8f36b6c..0000000 --- a/codecov.yml +++ /dev/null @@ -1,12 +0,0 @@ -comment: false - -coverage: - status: - project: - default: - target: auto - threshold: 1% - patch: - default: - target: auto - threshold: 1%