Skip to content

Commit

Permalink
Merge pull request #475 from Appsilon/improve-ci
Browse files Browse the repository at this point in the history
Improve Rhino CI
  • Loading branch information
kamilzyla authored Dec 12, 2023
2 parents 92194ee + 59086af commit 2b210b4
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 30 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rhino
Title: A Framework for Enterprise Shiny Applications
Version: 1.5.0.9001
Version: 1.5.0.9002
Authors@R:
c(
person("Kamil", "Żyła", role = c("aut", "cre"), email = "opensource+kamil@appsilon.com"),
Expand Down
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

1. Cypress updated to version 13.
2. `pkg_install` supports installation from local sources, GitHub, and Bioconductor.
3. Update Rhino CI (use latest versions and make better use of actions).

# [rhino 1.5.0](https://github.com/Appsilon/rhino/releases/tag/v1.5.0)

Expand Down
44 changes: 15 additions & 29 deletions inst/templates/github_ci/dot.github/workflows/rhino-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,31 @@ permissions:
jobs:
main:
name: Run linters and tests
runs-on: ubuntu-20.04
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Extract R version from lockfile
run: printf 'R_VERSION=%s\n' "$(jq --raw-output .R.Version renv.lock)" >> $GITHUB_ENV
- name: Setup system dependencies
run: |
packages=(
# List each package on a separate line.
)
sudo apt-get update
sudo apt-get install --yes "${packages[@]}"
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ env.R_VERSION }}

- name: Setup system dependencies
run: >
sudo apt-get update && sudo apt-get install --yes
libcurl4-openssl-dev
- name: Restore renv from cache
uses: actions/cache@v2
env:
CACHE_KEY: renv-${{ runner.arch }}-${{ runner.os }}-${{ env.R_VERSION }}
with:
path: renv/library
key: ${{ env.CACHE_KEY }}-${{ hashFiles('renv.lock') }}
restore-keys: ${{ env.CACHE_KEY }}-
r-version: renv

- name: Sync renv with lockfile
shell: Rscript {0}
run: |
options(renv.config.cache.symlinks = FALSE)
renv::restore(clean = TRUE)
- name: Setup R dependencies
uses: r-lib/actions/setup-renv@v2

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20

- name: Lint R
if: always()
Expand Down Expand Up @@ -77,7 +63,7 @@ jobs:

- name: Run Cypress end-to-end tests
if: always()
uses: cypress-io/github-action@v5
uses: cypress-io/github-action@v6
with:
working-directory: .rhino # Created by earlier commands which use Node.js
start: npm run run-app
Expand Down

0 comments on commit 2b210b4

Please sign in to comment.