Skip to content

Commit 5556015

Browse files
authored
Merge pull request #3 from cjerzak/codex/set-up-github-actions-for-unit-tests
Add GitHub Actions unit test workflow
2 parents eb0dc04 + ce6ad92 commit 5556015

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

.github/workflows/tests.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: R package tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
- uses: r-lib/actions/setup-r@v2
15+
- name: Install dependencies
16+
run: |
17+
install.packages(c("remotes", "testthat"))
18+
remotes::install_deps("DescriptiveRepresentationCalculator", dependencies = TRUE)
19+
shell: Rscript {0}
20+
- name: Install package
21+
run: R CMD INSTALL DescriptiveRepresentationCalculator
22+
- name: Run unit tests
23+
run: |
24+
R -q -e 'testthat::test_dir("DescriptiveRepresentationCalculator/tests/testthat")'
25+

0 commit comments

Comments
 (0)