Skip to content

Commit

Permalink
checking access to the patentsview API key
Browse files Browse the repository at this point in the history
  • Loading branch information
mustberuss committed Dec 23, 2024
1 parent e634e31 commit 7f0309e
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ jobs:
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
PATENTSVIEW_API_KEY: ${{ secrets.PATENTSVIEW_API_KEY }}
EXAMPLES_PARAM: ${{ github.event_name == 'push' && 'run_dontrun = TRUE' || 'run_dontrun = FALSE' }}
NOT_CRAN_VALUE: ${{ github.event_name == 'push' && 'TRUE' || 'FALSE' }}

steps:
- uses: actions/checkout@v4
Expand All @@ -40,6 +38,15 @@ jobs:

- uses: r-lib/actions/setup-pandoc@v2

- name: Check Secrets Access
run: |
if [[ "x${{ secrets.PATENTSVIEW_API_KEY }}" != "x" ]]; then
echo "Access to secrets"
else
echo "No access to secrets"
exit 1
fi
- name: Query dependencies
run: |
install.packages('remotes')
Expand Down Expand Up @@ -73,7 +80,6 @@ jobs:
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
NOT_CRAN: ${{ env.NOT_CRAN_VALUE }}

run: |
options(crayon.enabled = TRUE)
Expand All @@ -87,7 +93,7 @@ jobs:
run: |
options(crayon.enabled = TRUE)
remotes::install_cran("devtools")
devtools::run_examples( ${{ env.EXAMPLES_PARAM }} )
devtools::run_examples(run_dontrun = TRUE)
shell: Rscript {0}

- name: Upload check results
Expand Down

0 comments on commit 7f0309e

Please sign in to comment.