-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (40 loc) · 1.23 KB
/
R-CMD-check-all.yaml
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
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: R-CMD-check-all
jobs:
# determine what needs to be checked
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
# Expose matched filters as job 'packages' output variable
packages: ${{ steps.filter.outputs.changes }}
steps:
# For pull requests it's not necessary to checkout the code
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
testpkg01: 'testpkg01/**'
testpkg02:
- 'testpkg01/R'
- 'testpkg02/**'
# Jbuild and test each of modified packages
checkPackages:
needs: changes
# https://github.com/dorny/paths-filter/issues/66
if: ${{ needs.changes.outputs.packages != '[]' && needs.changes.outputs.packages != '' }}
strategy:
max-parallel: 1
matrix:
# see https://github.com/dorny/paths-filter
package: ${{ fromJSON(needs.changes.outputs.packages) }}
uses: ./.github/workflows/R-CMD-check.yaml
secrets: inherit
with:
pkg-path: ${{ matrix.package }}