Skip to content

Commit 6cbcfcb

Browse files
feature: includes quality-assurance-pipeline.yml to trigger quality tests per service changed in pull requests on master. Adds reusable-quality-assurance.yml to perform restore, build, and automated tests on each service using .NET 9. Facilitates segmented and automated validation of changes in the repository.
1 parent 5dd3743 commit 6cbcfcb

2 files changed

Lines changed: 114 additions & 0 deletions

File tree

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
name: workflow — trigger pull request quality assurance
2+
3+
on:
4+
pull_request:
5+
branches: [master]
6+
7+
jobs:
8+
changes:
9+
runs-on: ubuntu-latest
10+
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 }}
17+
18+
steps:
19+
- name: checkout
20+
uses: actions/checkout@v4
21+
22+
- name: detect changed paths
23+
id: filter
24+
uses: dorny/paths-filter@v3
25+
with:
26+
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:
38+
- 'Boundaries/Comanda.Orchestrator/**'
39+
40+
quality-assurance-subscriptions:
41+
needs: changes
42+
if: needs.changes.outputs.subscriptions == 'true'
43+
uses: ./.github/workflows/reusable-quality-assurance.yml
44+
with:
45+
service_path: Boundaries/Comanda.Subscriptions
46+
47+
quality-assurance-stores:
48+
needs: changes
49+
if: needs.changes.outputs.stores == 'true'
50+
uses: ./.github/workflows/reusable-quality-assurance.yml
51+
with:
52+
service_path: Boundaries/Comanda.Stores
53+
54+
quality-assurance-profiles:
55+
needs: changes
56+
if: needs.changes.outputs.profiles == 'true'
57+
uses: ./.github/workflows/reusable-quality-assurance.yml
58+
with:
59+
service_path: Boundaries/Comanda.Profiles
60+
61+
quality-assurance-payments:
62+
needs: changes
63+
if: needs.changes.outputs.payments == 'true'
64+
uses: ./.github/workflows/reusable-quality-assurance.yml
65+
with:
66+
service_path: Boundaries/Comanda.Payments
67+
68+
quality-assurance-orders:
69+
needs: changes
70+
if: needs.changes.outputs.orders == 'true'
71+
uses: ./.github/workflows/reusable-quality-assurance.yml
72+
with:
73+
service_path: Boundaries/Comanda.Orders
74+
75+
quality-assurance-orchestrator:
76+
needs: changes
77+
if: needs.changes.outputs.orchestrator == 'true'
78+
uses: ./.github/workflows/reusable-quality-assurance.yml
79+
with:
80+
service_path: Boundaries/Comanda.Orchestrator
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: workflow — quality assurance
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
service_path:
7+
required: true
8+
type: string
9+
10+
jobs:
11+
quality-assurance:
12+
runs-on: ubuntu-latest
13+
14+
defaults:
15+
run:
16+
working-directory: ${{ inputs.service_path }}
17+
18+
steps:
19+
- name: checkout
20+
uses: actions/checkout@v4
21+
22+
- name: setup dotnet
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: '9.0.x'
26+
27+
- name: restore
28+
run: dotnet restore
29+
30+
- name: build
31+
run: dotnet build --no-restore --configuration Release
32+
33+
- name: test
34+
run: dotnet test --no-build --configuration Release --verbosity normal

0 commit comments

Comments
 (0)