Skip to content

Commit 80a65fe

Browse files
committed
Update GA
1 parent 7fe32a8 commit 80a65fe

File tree

1 file changed

+31
-57
lines changed

1 file changed

+31
-57
lines changed

.github/workflows/GitHub_Actions_CI.yaml

Lines changed: 31 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -23,32 +23,26 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
config:
26-
- {os: macos-11, r: 'release', rspm: "https://packagemanager.rstudio.com/all/latest"}
27-
- {os: macos-10.15, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/all/latest"}
28-
- {os: ubuntu-20.04, r: 'devel', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
29-
- {os: ubuntu-20.04, r: 'release', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
30-
- {os: ubuntu-20.04, r: 'oldrel', not_cran: 'true', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26+
- {os: macos-13, r: 'release', not_cran: 'true'}
27+
- {os: macos-12, r: 'oldrel', not_cran: 'true'}
28+
- {os: ubuntu-latest, r: 'devel', not_cran: 'true',}
29+
- {os: ubuntu-latest, r: 'release', not_cran: 'true'}
30+
- {os: ubuntu-latest, r: 'oldrel', not_cran: 'true'}
3131

3232
env:
3333
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3434
RSPM: ${{ matrix.config.rspm }}
3535
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3636

3737
steps:
38-
- uses: actions/checkout@v2
38+
- uses: actions/checkout@v4
3939

40-
- uses: r-lib/actions/setup-r@v1
40+
- uses: r-lib/actions/setup-r@v2
4141
with:
4242
r-version: ${{ matrix.config.r }}
4343
http-user-agent: ${{ matrix.config.http-user-agent }}
4444

45-
- uses: r-lib/actions/setup-pandoc@v1
46-
47-
- name: Install remotes
48-
run: |
49-
install.packages('remotes')
50-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
51-
shell: Rscript {0}
45+
- uses: r-lib/actions/setup-pandoc@v2
5246

5347
- name: Cache R packages
5448
if: runner.os != 'Windows'
@@ -58,58 +52,38 @@ jobs:
5852
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
5953
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
6054

61-
- name: Install system dependencies
62-
if: runner.os == 'Linux'
63-
run: |
64-
while read -r cmd
65-
do
66-
eval sudo $cmd
67-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
68-
69-
- name: Install ghostscript (Linux)
70-
if: runner.os == 'Linux'
71-
run: |
72-
sudo apt-get install -y ghostscript
73-
sudo apt-get install -y curl
74-
75-
- name: Install dependencies
76-
run: |
77-
remotes::install_deps(dependencies = TRUE)
78-
remotes::install_cran("rcmdcheck")
79-
remotes::install_cran("covr")
80-
shell: Rscript {0}
55+
- uses: r-lib/actions/setup-r-dependencies@v2
56+
with:
57+
extra-packages: |
58+
any::rcmdcheck
59+
any::covr
60+
needs: check
8161

82-
- name: Session info
83-
run: |
84-
options(width = 100)
85-
pkgs <- installed.packages()[, "Package"]
86-
sessioninfo::session_info(pkgs, include_base = TRUE)
87-
shell: Rscript {0}
62+
- uses: r-lib/actions/check-r-package@v2
63+
with:
64+
upload-snapshots: true
8865

89-
- name: Remove depends.Rds
66+
- name: Test coverage
9067
run: |
91-
unlink("depends.Rds")
92-
shell: Rscript {0}
93-
94-
- name: Check
95-
env:
96-
_R_CHECK_CRAN_INCOMING_: false
97-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
68+
covr::codecov(
69+
quiet = FALSE,
70+
clean = TRUE,
71+
token = "${{ secrets.CODECOV_TOKEN }}",
72+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
73+
)
9874
shell: Rscript {0}
9975

10076
- name: Show testthat output
10177
if: always()
102-
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
78+
run: |
79+
## --------------------------------------------------------------------
80+
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
10381
shell: bash
10482

105-
- name: Upload check results
83+
- name: Upload test results
10684
if: failure()
107-
uses: actions/upload-artifact@main
85+
uses: actions/upload-artifact@v4
10886
with:
109-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
110-
path: check
87+
name: coverage-test-failures
88+
path: ${{ runner.temp }}/package
11189

112-
- name: Test coverage
113-
run: |
114-
covr::codecov()
115-
shell: Rscript {0}

0 commit comments

Comments
 (0)