Skip to content

Commit 49be7d7

Browse files
committed
Recent changes from DBI: Reestablish pkgdown.yaml, fix job names, apt-get update on start, Config/Needs/check
1 parent e0df949 commit 49be7d7

File tree

4 files changed

+66
-10
lines changed

4 files changed

+66
-10
lines changed

.github/workflows/R-CMD-check-dev.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ jobs:
7171
with:
7272
install-r: false
7373
cache-version: rcc-dev-${{ matrix.package }}-1
74-
extra-packages: "rcmdcheck remotes"
74+
needs: check
75+
extra-packages: "any::rcmdcheck any::remotes"
7576
token: ${{ secrets.GITHUB_TOKEN }}
7677

7778
- name: Install dev version of ${{ matrix.package }}

.github/workflows/R-CMD-check.yaml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121
name: rcc
2222

2323
jobs:
24-
R-CMD-check-smoke:
24+
rcc-smoke:
2525
runs-on: ubuntu-latest
2626
outputs:
2727
sha: ${{ steps.commit.outputs.sha }}
@@ -47,7 +47,8 @@ jobs:
4747
token: ${{ secrets.GITHUB_TOKEN }}
4848
install-r: false
4949
cache-version: rcc-smoke-1
50-
extra-packages: rcmdcheck roxygen2 styler
50+
needs: check
51+
extra-packages: any::rcmdcheck any::roxygen2 any::styler
5152

5253
- uses: ./.github/workflows/custom/after-install
5354

@@ -65,7 +66,7 @@ jobs:
6566
# Runs in a separate workflow, because it's using dev pkgdown
6667
# which might bring in other dev dependencies
6768
pkgdown:
68-
needs: R-CMD-check-smoke
69+
needs: rcc-smoke
6970

7071
runs-on: ubuntu-latest
7172

@@ -107,9 +108,9 @@ jobs:
107108
# Windows checks can be run in parallel and independently
108109
# when they alone take as long as the smoke and full tests combined.
109110
# To achieve this, remove the "needs:" element below.
110-
R-CMD-check-windows:
111+
rcc-windows:
111112
# Begin custom: early run
112-
needs: R-CMD-check-smoke
113+
needs: rcc-smoke
113114
# End custom: early run
114115

115116
runs-on: ${{ matrix.config.os }}
@@ -139,15 +140,16 @@ jobs:
139140
r-version: ${{ matrix.config.r }}
140141
cache-version: rcc-main-1
141142
token: ${{ secrets.GITHUB_TOKEN }}
143+
needs: check
142144

143145
- uses: ./.github/workflows/custom/after-install
144146

145147
- uses: ./.github/workflows/check
146148
with:
147149
results: ${{ runner.os }}-r${{ matrix.config.r }}
148150

149-
R-CMD-check-full:
150-
needs: R-CMD-check-smoke
151+
rcc-full:
152+
needs: rcc-smoke
151153

152154
runs-on: ${{ matrix.config.os }}
153155

@@ -200,6 +202,7 @@ jobs:
200202
r-version: ${{ matrix.config.r }}
201203
cache-version: rcc-main-1
202204
token: ${{ secrets.GITHUB_TOKEN }}
205+
needs: check
203206

204207
- uses: ./.github/workflows/custom/after-install
205208

.github/workflows/install/action.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ inputs:
1818
extra-packages:
1919
description: Passed on to r-lib/actions/setup-r-dependencies@v2
2020
required: false
21-
default: rcmdcheck
21+
default: any::rcmdcheck
2222
cache-version:
2323
description: Passed on to r-lib/actions/setup-r-dependencies@v2
2424
required: false
@@ -37,6 +37,12 @@ runs:
3737
echo "RGL_USE_NULL=true" | tee -a $GITHUB_ENV
3838
shell: bash
3939

40+
- name: Update apt
41+
if: runner.os == 'Linux'
42+
run: |
43+
sudo apt-get update
44+
shell: bash
45+
4046
- uses: r-lib/actions/setup-pandoc@v2
4147

4248
- uses: r-lib/actions/setup-r@v2
@@ -51,7 +57,7 @@ runs:
5157
GITHUB_PAT: ${{ inputs.token }}
5258
with:
5359
needs: ${{ inputs.needs }}
54-
extra-packages: ${{ inputs.extra-packages }} ${{ matrix.config.covr && 'covr' }}
60+
extra-packages: ${{ inputs.extra-packages }} ${{ matrix.config.covr && 'any::covr' }}
5561
cache-version: ${{ inputs.cache-version }}
5662

5763
- name: Add pkg.lock to .gitignore

.github/workflows/pkgdown.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
2+
# Also included in R-CMD-check.yaml, this workflow only listens to pushes to branches
3+
# that start with "docs*"
4+
on:
5+
push:
6+
branches:
7+
- "docs*"
8+
9+
name: pkgdown
10+
11+
jobs:
12+
pkgdown:
13+
runs-on: ubuntu-latest
14+
15+
name: "pkgdown"
16+
17+
# Begin custom: services
18+
# End custom: services
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
23+
- uses: ./.github/workflows/rate-limit
24+
with:
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
- uses: ./.github/workflows/git-identity
28+
if: github.event_name == 'push'
29+
30+
- uses: ./.github/workflows/custom/before-install
31+
32+
- uses: ./.github/workflows/install
33+
with:
34+
token: ${{ secrets.GITHUB_TOKEN }}
35+
install-r: false
36+
cache-version: pkgdown-1
37+
needs: website
38+
extra-packages: r-lib/pkgdown local::.
39+
40+
- uses: ./.github/workflows/custom/after-install
41+
42+
- uses: ./.github/workflows/pkgdown-build
43+
if: github.event_name != 'push'
44+
45+
- uses: ./.github/workflows/pkgdown-deploy
46+
if: github.event_name == 'push'

0 commit comments

Comments
 (0)