Skip to content

Commit 3022a90

Browse files
committed
ci: update backfill-corr-ci.yml
* simplify caching (r-lib/setup-r-dependencies caches by default) * switch to Ubuntu latest * keep R on 4.2
1 parent 20693a2 commit 3022a90

File tree

1 file changed

+11
-31
lines changed

1 file changed

+11
-31
lines changed

.github/workflows/backfill-corr-ci.yml

Lines changed: 11 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,57 +10,37 @@ name: R backfill corrections
1010

1111
on:
1212
push:
13-
branches: [ main, prod ]
13+
branches: [main, prod]
1414
pull_request:
15-
types: [ opened, synchronize, reopened, ready_for_review ]
16-
branches: [ main, prod ]
15+
types: [opened, synchronize, reopened, ready_for_review]
16+
branches: [main, prod]
1717

1818
jobs:
1919
build:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-latest
2121
if: github.event.pull_request.draft == false
22-
strategy:
23-
matrix:
24-
r-version: [4.2.1]
2522
defaults:
2623
run:
2724
working-directory: backfill_corrections/delphiBackfillCorrection
2825

2926
steps:
30-
- uses: actions/checkout@v2
31-
- name: Set up R ${{ matrix.r-version }}
27+
- uses: actions/checkout@v4
28+
29+
- name: Set up R 4.2
3230
uses: r-lib/actions/setup-r@v2
3331
with:
34-
r-version: ${{ matrix.r-version }}
3532
use-public-rspm: true
36-
- name: Install linux dependencies
37-
run: |
38-
sudo apt-get install \
39-
libcurl4-openssl-dev \
40-
libgdal-dev \
41-
libudunits2-dev \
42-
libglpk-dev \
43-
libharfbuzz-dev \
44-
libfribidi-dev
45-
- name: Get date
46-
id: get-date
47-
run: |
48-
echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
49-
- name: Cache R packages
50-
uses: actions/cache@v2
51-
with:
52-
path: ${{ env.R_LIBS_USER }}
53-
key: ${{ runner.os }}-r-backfillcorr-${{ steps.get-date.outputs.date }}
54-
restore-keys: |
55-
${{ runner.os }}-r-backfillcorr-
33+
r-version: 4.2
34+
5635
- name: Install and cache dependencies
5736
env:
5837
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5938
uses: r-lib/actions/setup-r-dependencies@v2
6039
with:
6140
extra-packages: any::rcmdcheck
6241
working-directory: backfill_corrections/delphiBackfillCorrection
63-
upgrade: 'TRUE'
42+
upgrade: "TRUE"
43+
6444
- name: Check package
6545
uses: r-lib/actions/check-r-package@v2
6646
with:

0 commit comments

Comments
 (0)