-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub_test_report.yml
More file actions
45 lines (39 loc) · 1.21 KB
/
github_test_report.yml
File metadata and controls
45 lines (39 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
on:
push:
pull_request:
name: test-report
jobs:
build-test:
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
name: Build & Test
runs-on: ubuntu-latest
permissions:
statuses: write
checks: write
contents: write
pull-requests: write
actions: write
steps:
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-r-dependencies@v2
with:
working-directory: "./PkgName"
extra-packages: local::.
- run: |
install.packages("tinytest2JUnit")
shell: Rscript {0}
- run: |
tinytest2JUnit::testPackage(package ="PkgName", file = file.path(getwd(), "results.xml"))
shell: Rscript {0}
- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: JUnit Tests # Name of the check run which will be created
path: results.xml # Path to test results
reporter: java-junit # Format of test results