diff --git a/.Rbuildignore b/.Rbuildignore index c7af0de..1fcde76 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -10,35 +10,45 @@ ^.*\.Rproj$ ^\.Rproj\.user$ -# Directories -^github-helpers$ + +# Github ^\.github$ +^github-helpers$ + + +# Codecov +^.codecov\.yml$ +^codecov\.yml$ + + +# Pkgdown +^_pkgdown\.yml$ ^pkgdown$ -^data-raw$ -^docs$ + ^docs$ + + +# Directories ^_tmp$ +^data-raw$ + # Helper files -^\.github$ -^github-helpers$ -^codecov\.yml$ -^NEWS\.html$ ^CONTRIBUTING\.md$ +^LICENSE\.md$ +^NEWS\.html$ ^README\.md$ ^README\.Rmd$ -^codecov\.yml$ -^_pkgdown\.yml$ Makefile + # Unwanted files Rplots.pdf -# Other/Broad -^.*\.html -^.*\.pdf ### Package-specific ### ^inst/extdata/chondro\.gz$ +^inst/extdata/winspec.pdf$ +^Vignettes-Rnw$ tests/testthat/fileio diff --git a/.github/.gitignore b/.github/.gitignore index 2d19fc7..ac8f5fa 100644 --- a/.github/.gitignore +++ b/.github/.gitignore @@ -1 +1,9 @@ +# READ-ONLY FILE +# +# Original file resides in r-hyperspec/pkg-skelton. +# DO NOT EDIT in any other repo as these changes will be overwritten. +# Edit at r-hyperspec/pkg-skelton, then push there and +# this file will be deployed to the other repos. +# + *.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 7e5ac22..601ff81 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -13,6 +13,9 @@ on: - master - develop + # - auto-update + - auto-update-test + pull_request: branches: - release @@ -43,6 +46,7 @@ jobs: env: R_KEEP_PKG_SOURCE: yes GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + CACHE_VERSION: 1 steps: - uses: actions/checkout@v2 @@ -68,8 +72,8 @@ jobs: 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- + key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-${CACHE_VERSION}-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-${CACHE_VERSION}- - name: Install system dependencies if: runner.os == 'Linux' diff --git a/.github/workflows/drat--insert-package.yaml b/.github/workflows/drat--insert-package.yaml index 8ce520d..ab0e5cc 100644 --- a/.github/workflows/drat--insert-package.yaml +++ b/.github/workflows/drat--insert-package.yaml @@ -33,31 +33,40 @@ on: branches: - develop + # - auto-update + - auto-update-test + name: Insert package (drat) jobs: drat: + if: ${{ github.event.head_commit.message }} != "Automated file update from pkg-skeleton" + runs-on: ${{ matrix.config.os }} - name: ${{ matrix.config.os }} (R-${{ matrix.config.r }}) + name: "drat: ${{ matrix.config.os }} (R-${{ matrix.config.r }})" strategy: fail-fast: false matrix: config: - # - {os: ubuntu-latest, r: 'release'} - - {os: macOS-latest, r: 'release'} + - {os: ubuntu-latest, r: 'release'} + # - {os: macOS-latest, r: 'release'} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true RSPM: ${{ matrix.config.rspm }} REPO: ${{ github.event.repository.name }} GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} - + CACHE_VERSION: 1 steps: - uses: actions/checkout@v2 + - name: Info + run: | + echo "GitHub actor: ${{ github.actor }}" + - uses: r-lib/actions/setup-r@master with: r-version: ${{ matrix.config.r }} @@ -72,13 +81,13 @@ jobs: writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") shell: Rscript {0} - - name: Cache R packages + - name: Restore R package cache # if: runner.os != 'Windows' 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- + key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-${CACHE_VERSION}-${{ hashFiles('.github/depends.Rds') }} + restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-${CACHE_VERSION}- - name: Install system dependencies if: runner.os == 'Linux' @@ -116,7 +125,7 @@ jobs: run: | git config --global url."https://${TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" - git config --global user.email "${REPO}_Deploy_Bot@example.com" + git config --global user.email "$actions@github.com" git config --global user.name "${REPO} Deploy Bot" - name: Drat -- clone r-hyperspec/pkg-repo diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml index ad4a822..3634753 100644 --- a/.github/workflows/pkgdown.yaml +++ b/.github/workflows/pkgdown.yaml @@ -13,6 +13,10 @@ on: - main - master - develop + + # - auto-update + - auto-update-test + tags: ['*'] name: Website (pkgdown) @@ -42,7 +46,7 @@ jobs: shell: Rscript {0} - name: Cache R packages - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ${{ env.R_LIBS_USER }} key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} @@ -52,7 +56,7 @@ jobs: run: | install.packages(c("remotes", "devtools")) remotes::install_deps(dependencies = TRUE) - remotes::install_cran("pkgdown") + remotes::install_cran("pkgdown", type = "binary") shell: Rscript {0} - name: Roxygenize diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 1404e2b..40ebe4a 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -13,6 +13,9 @@ on: - master - develop + # - auto-update + - auto-update-test + pull_request: branches: - release diff --git a/.gitignore b/.gitignore index 35cc992..543b6c3 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,7 @@ vignettes/*.html vignettes/*.R vignettes/fileio vignettes/resources/*.bib +inst/doc # Documentation man/*.Rd