|
10 | 10 | - master
|
11 | 11 |
|
12 | 12 | name: upstream
|
13 |
| - |
14 |
| -jobs: |
15 |
| - R-CMD-check: |
16 |
| - runs-on: ${{ matrix.config.os }} |
17 |
| - |
18 |
| - name: ${{ matrix.config.os }} (${{ matrix.config.r }}) |
19 |
| - |
20 |
| - strategy: |
21 |
| - fail-fast: false |
22 |
| - matrix: |
23 |
| - config: |
24 |
| - - {upstream: r-prof/winch, os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} |
25 |
| - |
26 |
| - env: |
27 |
| - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true |
28 |
| - RSPM: ${{ matrix.config.rspm }} |
29 |
| - GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} |
30 |
| - |
31 |
| - steps: |
32 |
| - - uses: actions/checkout@v2 |
33 |
| - - path: this |
34 |
| - - uses: actions/checkout@v2 |
35 |
| - - repo: ${{ matrix.config.upstream }} |
36 |
| - - path: upstream |
37 |
| - |
38 |
| - - uses: r-lib/actions/setup-r@master |
39 |
| - with: |
40 |
| - r-version: ${{ matrix.config.r }} |
41 |
| - http-user-agent: ${{ matrix.config.http-user-agent }} |
42 |
| - |
43 |
| - - uses: r-lib/actions/setup-pandoc@master |
44 |
| - |
45 |
| - - name: Query dependencies |
46 |
| - run: | |
47 |
| - install.packages('remotes') |
48 |
| - saveRDS(remotes::dev_package_deps("this", dependencies = TRUE), ".github/depends.Rds", version = 2) |
49 |
| - writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") |
50 |
| - shell: Rscript {0} |
51 |
| - working-directory: ./upstream |
52 |
| - |
53 |
| - - name: Cache R packages |
54 |
| - if: runner.os != 'Windows' |
55 |
| - uses: actions/cache@v1 |
56 |
| - with: |
57 |
| - path: ${{ env.R_LIBS_USER }} |
58 |
| - key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} |
59 |
| - restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- |
60 |
| - working-directory: ./upstream |
61 |
| - |
62 |
| - - name: Install system dependencies |
63 |
| - if: runner.os == 'Linux' |
64 |
| - run: | |
65 |
| - while read -r cmd |
66 |
| - do |
67 |
| - eval sudo $cmd |
68 |
| - done < <(Rscript -e 'req <- remotes::system_requirements("ubuntu", "16.04"); if (length(req) > 0) cat(req, sep = "\n")') |
69 |
| - working-directory: ./upstream |
70 |
| - |
71 |
| - - name: Install dependencies |
72 |
| - run: | |
73 |
| - remotes::install_deps(dependencies = TRUE) |
74 |
| - remotes::install_cran("rcmdcheck") |
75 |
| - shell: Rscript {0} |
76 |
| - working-directory: ./upstream |
77 |
| - |
78 |
| - - name: Install local |
79 |
| - run: | |
80 |
| - remotes::install_local(".") |
81 |
| - shell: Rscript {0} |
82 |
| - working-directory: ./this |
83 |
| - |
84 |
| - - name: Session info |
85 |
| - run: | |
86 |
| - options(width = 100) |
87 |
| - pkgs <- installed.packages()[, "Package"] |
88 |
| - sessioninfo::session_info(pkgs, include_base = TRUE) |
89 |
| - shell: Rscript {0} |
90 |
| - |
91 |
| - - name: Check |
92 |
| - env: |
93 |
| - _R_CHECK_CRAN_INCOMING_: false |
94 |
| - _R_CHECK_SYSTEM_CLOCK_: false |
95 |
| - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = if (getRversion() >= "3.5" && getRversion() < "3.6") "error" else "warning", check_dir = "check") |
96 |
| - shell: Rscript {0} |
97 |
| - working-directory: ./upstream |
98 |
| - |
99 |
| - - name: Show testthat output |
100 |
| - if: always() |
101 |
| - run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true |
102 |
| - shell: bash |
103 |
| - working-directory: ./upstream |
104 |
| - |
105 |
| - - name: Upload check results |
106 |
| - if: failure() |
107 |
| - uses: actions/upload-artifact@main |
108 |
| - with: |
109 |
| - name: ${{ runner.os }}-r${{ matrix.config.r }}-results |
110 |
| - path: upstream/check |
0 commit comments