generated from dfe-analytical-services/shiny-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
360 additions
and
391 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
pull_request: | ||
|
||
name: Automated tests | ||
|
||
jobs: | ||
automatedTests: | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- name: Install git2r dependencies | ||
run: sudo apt-get install -y libgit2-dev | ||
|
||
- name: Cache renv packages | ||
id: cache-renv | ||
uses: actions/cache@v4 | ||
with: | ||
path: cache-renv | ||
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-renv- | ||
- uses: r-lib/actions/setup-renv@v2 | ||
|
||
- name: Run tests | ||
shell: Rscript {0} | ||
run: | | ||
shinytest2::test_app() | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
# The branches below must be a subset of the branches above | ||
branches: [ "main" ] | ||
schedule: | ||
- cron: '20 3 * * 0' | ||
|
||
name: lintr | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lintr: | ||
runs-on: ${{ matrix.config.os }} | ||
|
||
name: Run lintr scanning | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
# Running on mac as it's quicker to build | ||
- {os: macOS-latest, r: 'release'} | ||
|
||
permissions: | ||
contents: read # for checkout to fetch code | ||
security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@4e1feaf90520ec1215d1882fdddfe3411c08e492 | ||
with: | ||
r-version: 4.2.1 | ||
use-public-rspm: true | ||
|
||
- name: restore renv | ||
uses: r-lib/actions/setup-renv@v2 | ||
|
||
- name: Install lintr | ||
shell: Rscript {0} | ||
run: | | ||
renv::install("lintr") | ||
- name: Run lintr | ||
run: lintr::sarif_output(lintr::lint_dir("."), "lintr-results.sarif") | ||
shell: Rscript {0} | ||
continue-on-error: true | ||
|
||
- name: Upload analysis results to GitHub | ||
uses: github/codeql-action/upload-sarif@v2 | ||
with: | ||
sarif_file: lintr-results.sarif | ||
wait-for-processing: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.