-
Notifications
You must be signed in to change notification settings - Fork 47
54 lines (48 loc) · 1.54 KB
/
leeyabot.yml
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
46
47
48
49
50
51
52
53
54
name: leeyabot
on:
pull_request:
branches:
- '**' # matches every branch
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: iterative/setup-cml@v1
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- name: Install libcurl
run: sudo apt-get install libcurl4-openssl-dev
- name: Install dependencies
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
install.packages(c("ggplot2", "rmarkdown", "dplyr", "remotes", "here"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Install package
run: R CMD INSTALL .
- name: Generate report
run: |
rmarkdown::render("./scripts/OutputDifferences.Rmd", run_pandoc = FALSE)
shell: Rscript {0}
- name: Post comment
env:
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Post reports as comments in GitHub PRs
cd scripts/
if [ -f "diff_plot.png" ]
then
cat OutputDifferences.knit.md >> report.md
echo "![](./diff_plot.png)" >> report.md
echo "![](./comp_plot.png)" >> report.md
elif [ -f "same_plot.png" ]
then
cat OutputDifferences.knit.md >> report.md
else
cat OutputDifferences.knit.md >> report.md
echo "leeyabot down :(" > report.md
fi
cml comment create report.md