-
Notifications
You must be signed in to change notification settings - Fork 56
41 lines (37 loc) · 1.27 KB
/
main.yml
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
---
name: 'Shinyapps Package Dependency Tests'
on:
workflow_dispatch:
push:
paths:
- 'packages/**'
- '.github/workflows/*.yml'
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
list-tests:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.list-tests.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- name: Print Tests
run: echo "matrix=$(ls -1 -d packages/* | grep -v gsl | tr '\n' '\0' | xargs -0 -n 1 basename | jq -Rsc '. / "\n" - [""]')"
- name: List Tests As Output
id: list-tests
run: echo "matrix=$(ls -1 -d packages/* | grep -v gsl | tr '\n' '\0' | xargs -0 -n 1 basename | jq -Rsc '. / "\n" - [""]')" >> $GITHUB_OUTPUT
test-package:
name: ${{ matrix.stack }} on ${{ matrix.os }}
needs: list-tests
runs-on: ubuntu-latest
strategy:
matrix:
stack: ${{ fromJSON(needs.list-tests.outputs.matrix) }}
os: [jammy]
container:
image: rstudio/shinyapps-package-dependencies:${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: ./test ${{ matrix.stack }}