Skip to content

Commit e476ba7

Browse files
authored
Execute integration tests based on changes (#1421)
* Execute integration tests based on changes Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Trigger fabric tests Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Trigger ethereum tests Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Trigger fisco-bcos tests Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Trigger through core changes Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Make change that shouldn't trigger any integration tests Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com> * Address review comments * Fix edge case with empty matrix Signed-off-by: CaptainIRS <36656347+CaptainIRS@users.noreply.github.com>
1 parent acb518e commit e476ba7

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

.github/workflows/integration-tests.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,57 @@ env:
77
NPM_VERSION: 8.15.0
88

99
jobs:
10+
changes:
11+
name: Check for changes
12+
runs-on: ubuntu-latest
13+
outputs:
14+
adaptor: ${{ steps.filter.outputs.changes }}
15+
steps:
16+
- uses: dorny/paths-filter@v2
17+
id: filter
18+
with:
19+
filters: |
20+
fabric:
21+
- 'packages/caliper-cli/**'
22+
- 'packages/caliper-core/**'
23+
- 'packages/caliper-fabric/**'
24+
- 'packages/caliper-publish/**'
25+
- 'packages/caliper-tests-integration/fabric_tests/**'
26+
ethereum:
27+
- 'packages/caliper-cli/**'
28+
- 'packages/caliper-core/**'
29+
- 'packages/caliper-ethereum/**'
30+
- 'packages/caliper-publish/**'
31+
- 'packages/caliper-tests-integration/ethereum_tests/**'
32+
besu:
33+
- 'packages/caliper-cli/**'
34+
- 'packages/caliper-core/**'
35+
- 'packages/caliper-ethereum/**'
36+
- 'packages/caliper-publish/**'
37+
- 'packages/caliper-tests-integration/besu_tests/**'
38+
fisco-bcos:
39+
- 'packages/caliper-cli/**'
40+
- 'packages/caliper-core/**'
41+
- 'packages/caliper-fisco-bcos/**'
42+
- 'packages/caliper-publish/**'
43+
- 'packages/caliper-tests-integration/fisco-bcos_tests/**'
44+
generator:
45+
- 'packages/caliper-cli/**'
46+
- 'packages/caliper-core/**'
47+
- 'packages/caliper-fabric/**'
48+
- 'packages/generator-caliper/**'
49+
- 'packages/caliper-publish/**'
50+
- 'packages/caliper-tests-integration/generator_tests/**'
51+
1052
integration-tests:
53+
needs: changes
54+
if: ${{ needs.changes.outputs.adaptor != '[]' && needs.changes.outputs.adaptor != '' }}
1155
name: Integration Tests
1256
runs-on: ubuntu-latest
1357
strategy:
1458
fail-fast: false
1559
matrix:
16-
adaptor: [fabric, ethereum, besu, fisco-bcos, generator]
60+
adaptor: ${{ fromJSON(needs.changes.outputs.adaptor) }}
1761
node-version: [14.x, 16.x]
1862
steps:
1963
- uses: actions/checkout@v3

0 commit comments

Comments
 (0)