-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.19 KB
/
test.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
42
43
44
45
46
47
48
49
name: Release
permissions:
contents: write
pull-requests: write
attestations: write
id-token: write
on:
pull_request:
jobs:
changed-plugins:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.changed-plugins.outputs.all_changed_files }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: tj-actions/changed-files@v44
id: changed-plugins
with:
files: |
splunk/**
dir_names: 'true'
dir_names_max_depth: '1'
matrix: 'true'
- name: List all changed plugins
run: echo '${{ steps.changed-plugins.outputs.all_changed_files }}'
test:
runs-on: ubuntu-latest
needs: [changed-plugins]
strategy:
matrix:
package: ${{ fromJSON(needs.changed-plugins.outputs.matrix) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- run: rustup toolchain install stable --profile minimal
- uses: jcbhmr/setup-cargo-component@v1
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo component build -p ${{ matrix.package }}