🔖 v0.1.2 #67
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |