|
1 | | -name: workflow — trigger pull request quality assurance |
| 1 | +name: pipeline ci/cd — trigger pull request quality assurance |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | pull_request: |
5 | | - branches: [master] |
| 5 | + branches: |
| 6 | + - master |
6 | 7 |
|
7 | 8 | jobs: |
8 | 9 | changes: |
9 | 10 | runs-on: ubuntu-latest |
10 | 11 | outputs: |
11 | | - subscriptions: ${{ steps.filter.outputs.subscriptions }} |
12 | | - stores: ${{ steps.filter.outputs.stores }} |
13 | | - profiles: ${{ steps.filter.outputs.profiles }} |
14 | | - payments: ${{ steps.filter.outputs.payments }} |
15 | | - orders: ${{ steps.filter.outputs.orders }} |
16 | | - orchestrator: ${{ steps.filter.outputs.orchestrator }} |
| 12 | + # filters for boundaries |
| 13 | + comanda_boundaries_orchestrator: ${{ steps.filter.outputs.comanda_boundaries_orchestrator }} |
| 14 | + comanda_boundaries_orders: ${{ steps.filter.outputs.comanda_boundaries_orders }} |
| 15 | + comanda_boundaries_payments: ${{ steps.filter.outputs.comanda_boundaries_payments }} |
| 16 | + comanda_boundaries_profiles: ${{ steps.filter.outputs.comanda_boundaries_profiles }} |
| 17 | + comanda_boundaries_stores: ${{ steps.filter.outputs.comanda_boundaries_stores }} |
| 18 | + comanda_boundaries_subscriptions: ${{ steps.filter.outputs.comanda_boundaries_subscriptions }} |
| 19 | + |
| 20 | + # filters for packages |
| 21 | + comanda_internal_contracts: ${{ steps.filter.outputs.comanda_internal_contracts }} |
| 22 | + comanda_internal_aspnet: ${{ steps.filter.outputs.comanda_internal_aspnet }} |
17 | 23 |
|
18 | 24 | steps: |
19 | 25 | - name: checkout |
20 | | - uses: actions/checkout@v4 |
| 26 | + uses: actions/checkout@v5 |
21 | 27 |
|
22 | 28 | - name: detect changed paths |
23 | 29 | id: filter |
24 | | - uses: dorny/paths-filter@v3 |
| 30 | + uses: dorny/paths-filter@v4 |
25 | 31 | with: |
26 | 32 | filters: | |
27 | | - subscriptions: |
28 | | - - 'Boundaries/Comanda.Subscriptions/**' |
29 | | - stores: |
30 | | - - 'Boundaries/Comanda.Stores/**' |
31 | | - profiles: |
32 | | - - 'Boundaries/Comanda.Profiles/**' |
33 | | - payments: |
34 | | - - 'Boundaries/Comanda.Payments/**' |
35 | | - orders: |
36 | | - - 'Boundaries/Comanda.Orders/**' |
37 | | - orchestrator: |
| 33 | + comanda_boundaries_orchestrator: |
38 | 34 | - 'Boundaries/Comanda.Orchestrator/**' |
| 35 | + comanda_boundaries_orders: |
| 36 | + - 'Boundaries/Comanda.Orders/**' |
| 37 | + comanda_boundaries_payments: |
| 38 | + - 'Boundaries/Comanda.Payments/**' |
| 39 | + comanda_boundaries_profiles: |
| 40 | + - 'Boundaries/Comanda.Profiles/**' |
| 41 | + comanda_boundaries_stores: |
| 42 | + - 'Boundaries/Comanda.Stores/**' |
| 43 | + comanda_boundaries_subscriptions: |
| 44 | + - 'Boundaries/Comanda.Subscriptions/**' |
| 45 | + comanda_internal_contracts: |
| 46 | + - 'Artifacts/Comanda.Internal.Contracts/**' |
| 47 | + comanda_internal_aspnet: |
| 48 | + - 'Artifacts/Comanda.Internal.AspNet/**' |
| 49 | +
|
| 50 | +# run build and tests for comanda orchestrator if there are changes in the corresponding path |
| 51 | + quality-assurance-boundaries-orchestrator: |
| 52 | + needs: changes |
| 53 | + if: needs.changes.outputs.comanda_boundaries_orchestrator == 'true' |
| 54 | + uses: ./.github/workflows/template-quality-assurance.yml |
| 55 | + with: |
| 56 | + service_path: Boundaries/Comanda.Orchestrator |
| 57 | + |
| 58 | +# run build and tests for comanda orders if there are changes in the corresponding path |
| 59 | + quality-assurance-boundaries-orders: |
| 60 | + needs: changes |
| 61 | + if: needs.changes.outputs.comanda_boundaries_orders == 'true' |
| 62 | + uses: ./.github/workflows/template-quality-assurance.yml |
| 63 | + with: |
| 64 | + service_path: Boundaries/Comanda.Orders |
39 | 65 |
|
40 | | - quality-assurance-subscriptions: |
| 66 | +# run build and tests for comanda payments if there are changes in the corresponding path |
| 67 | + quality-assurance-boundaries-payments: |
41 | 68 | needs: changes |
42 | | - if: needs.changes.outputs.subscriptions == 'true' |
43 | | - uses: ./.github/workflows/reusable-quality-assurance.yml |
| 69 | + if: needs.changes.outputs.comanda_boundaries_payments == 'true' |
| 70 | + uses: ./.github/workflows/template-quality-assurance.yml |
44 | 71 | with: |
45 | | - service_path: Boundaries/Comanda.Subscriptions |
| 72 | + service_path: Boundaries/Comanda.Payments |
46 | 73 |
|
47 | | - quality-assurance-stores: |
| 74 | +# run build and tests for comanda profiles if there are changes in the corresponding path |
| 75 | + quality-assurance-boundaries-profiles: |
48 | 76 | needs: changes |
49 | | - if: needs.changes.outputs.stores == 'true' |
50 | | - uses: ./.github/workflows/reusable-quality-assurance.yml |
| 77 | + if: needs.changes.outputs.comanda_boundaries_profiles == 'true' |
| 78 | + uses: ./.github/workflows/template-quality-assurance.yml |
51 | 79 | with: |
52 | | - service_path: Boundaries/Comanda.Stores |
| 80 | + service_path: Boundaries/Comanda.Profiles |
53 | 81 |
|
54 | | - quality-assurance-profiles: |
| 82 | +# run build and tests for comanda stores if there are changes in the corresponding path |
| 83 | + quality-assurance-boundaries-stores: |
55 | 84 | needs: changes |
56 | | - if: needs.changes.outputs.profiles == 'true' |
57 | | - uses: ./.github/workflows/reusable-quality-assurance.yml |
| 85 | + if: needs.changes.outputs.comanda_boundaries_stores == 'true' |
| 86 | + uses: ./.github/workflows/template-quality-assurance.yml |
58 | 87 | with: |
59 | | - service_path: Boundaries/Comanda.Profiles |
| 88 | + service_path: Boundaries/Comanda.Stores |
60 | 89 |
|
61 | | - quality-assurance-payments: |
| 90 | +# run build and tests for comanda subscriptions if there are changes in the corresponding path |
| 91 | + quality-assurance-boundaries-subscriptions: |
62 | 92 | needs: changes |
63 | | - if: needs.changes.outputs.payments == 'true' |
64 | | - uses: ./.github/workflows/reusable-quality-assurance.yml |
| 93 | + if: needs.changes.outputs.comanda_boundaries_subscriptions == 'true' |
| 94 | + uses: ./.github/workflows/template-quality-assurance.yml |
65 | 95 | with: |
66 | | - service_path: Boundaries/Comanda.Payments |
| 96 | + service_path: Boundaries/Comanda.Subscriptions |
67 | 97 |
|
68 | | - quality-assurance-orders: |
| 98 | +# run build and tests for comanda internal contracts if there are changes in the corresponding path |
| 99 | + quality-assurance-internal-contracts: |
69 | 100 | needs: changes |
70 | | - if: needs.changes.outputs.orders == 'true' |
71 | | - uses: ./.github/workflows/reusable-quality-assurance.yml |
| 101 | + if: needs.changes.outputs.comanda_internal_contracts == 'true' |
| 102 | + uses: ./.github/workflows/template-quality-assurance.yml |
72 | 103 | with: |
73 | | - service_path: Boundaries/Comanda.Orders |
| 104 | + service_path: Artifacts/Comanda.Internal.Contracts |
74 | 105 |
|
75 | | - quality-assurance-orchestrator: |
| 106 | +# run build and tests for comanda internal aspnet if there are changes in the corresponding path |
| 107 | + quality-assurance-internal-aspnet: |
76 | 108 | needs: changes |
77 | | - if: needs.changes.outputs.orchestrator == 'true' |
78 | | - uses: ./.github/workflows/reusable-quality-assurance.yml |
| 109 | + if: needs.changes.outputs.comanda_internal_aspnet == 'true' |
| 110 | + uses: ./.github/workflows/template-quality-assurance.yml |
79 | 111 | with: |
80 | | - service_path: Boundaries/Comanda.Orchestrator |
| 112 | + service_path: Artifacts/Comanda.Internal.AspNet |
0 commit comments