Skip to content

Commit

Permalink
Add package and linter checks to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
pixup1 committed Nov 30, 2024
1 parent 17e4abf commit 07b69b3
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
^\.lintr$
^LICENSE\.md$
^LICENSE\.md$
^\.github$
52 changes: 52 additions & 0 deletions .github/workflows/r-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,55 @@ jobs:
- name: Run R tests
run: |
Rscript -e 'devtools::test()'
check:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev pkg-config libcurl4-openssl-dev
- name: Setup R environment
uses: r-lib/actions/setup-r@v2
with:
r-version: 'latest'

- name: Install devtools and package dependencies
run: |
Rscript -e 'install.packages("devtools", dependencies = NA)'
Rscript -e 'devtools::install_deps(dep = TRUE)'
- name: Check package
run: |
Rscript -e 'devtools::check()'
linter:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libharfbuzz-dev libfribidi-dev libfreetype6-dev pkg-config libcurl4-openssl-dev
- name: Setup R environment
uses: r-lib/actions/setup-r@v2
with:
r-version: 'latest'

- name: Install devtools and package dependencies
run: |
Rscript -e 'install.packages("devtools", dependencies = NA)'
Rscript -e 'devtools::install_deps(dep = TRUE)'
- name: Check linting
run: |
Rscript -e 'lintr::expect_lint_free()'

0 comments on commit 07b69b3

Please sign in to comment.