Skip to content

Commit

Permalink
Merge pull request #44 from r-hyperspec/auto-update-test
Browse files Browse the repository at this point in the history
Auto update test
  • Loading branch information
GegznaV authored Dec 1, 2021
2 parents cd17f88 + 38fed8e commit c256d8a
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 25 deletions.
36 changes: 23 additions & 13 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -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


8 changes: 8 additions & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -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
8 changes: 6 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- master
- develop

# - auto-update
- auto-update-test

pull_request:
branches:
- release
Expand Down Expand Up @@ -43,6 +46,7 @@ jobs:
env:
R_KEEP_PKG_SOURCE: yes
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CACHE_VERSION: 1

steps:
- uses: actions/checkout@v2
Expand All @@ -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'
Expand Down
25 changes: 17 additions & 8 deletions .github/workflows/drat--insert-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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'
Expand Down Expand Up @@ -116,7 +125,7 @@ jobs:
run: |
git config --global url."https://${TOKEN}:[email protected]/".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
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ on:
- main
- master
- develop

# - auto-update
- auto-update-test

tags: ['*']

name: Website (pkgdown)
Expand Down Expand Up @@ -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') }}
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ on:
- master
- develop

# - auto-update
- auto-update-test

pull_request:
branches:
- release
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ vignettes/*.html
vignettes/*.R
vignettes/fileio
vignettes/resources/*.bib
inst/doc

# Documentation
man/*.Rd
Expand Down

0 comments on commit c256d8a

Please sign in to comment.