@@ -19,31 +19,49 @@ jobs:
19
19
name : Setup for tests (Linux)
20
20
runs-on : ubuntu-latest
21
21
outputs :
22
- integrations_tests_matrix : ${{ steps.generate_integrations_test_matrix .outputs.integrations_tests_matrix }}
23
- templates_tests_matrix : ${{ steps.generate_templates_test_matrix .outputs.templates_tests_matrix }}
22
+ integrations_tests_matrix : ${{ steps.generate_tests_matrix .outputs.integrations_tests_matrix }}
23
+ templates_tests_matrix : ${{ steps.generate_tests_matrix .outputs.templates_tests_matrix }}
24
24
steps :
25
25
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
26
26
27
- - uses : ./.github/actions/enumerate-template-tests
28
- id : generate_templates_test_matrix
29
-
30
27
- uses : ./.github/actions/enumerate-tests
31
- id : generate_integrations_test_matrix
28
+ id : generate_tests_matrix
29
+ with :
30
+ includeIntegrations : true
31
+ includeTemplates : true
32
32
33
33
setup_for_tests_win :
34
34
name : Setup for tests (Windows)
35
35
runs-on : windows-latest
36
36
outputs :
37
- integrations_tests_matrix : ${{ steps.generate_integrations_test_matrix .outputs.integrations_tests_matrix }}
38
- templates_tests_matrix : ${{ steps.generate_templates_test_matrix .outputs.templates_tests_matrix }}
37
+ integrations_tests_matrix : ${{ steps.generate_tests_matrix .outputs.integrations_tests_matrix }}
38
+ templates_tests_matrix : ${{ steps.generate_tests_matrix .outputs.templates_tests_matrix }}
39
39
steps :
40
40
- uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
41
41
42
- - uses : ./.github/actions/enumerate-template-tests
43
- id : generate_templates_test_matrix
44
-
45
42
- uses : ./.github/actions/enumerate-tests
46
- id : generate_integrations_test_matrix
43
+ id : generate_tests_matrix
44
+ with :
45
+ includeIntegrations : true
46
+ includeTemplates : true
47
+
48
+ build_packages :
49
+ name : Build packages
50
+ runs-on : ubuntu-latest
51
+ steps :
52
+ - name : Checkout code
53
+ uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
54
+
55
+ - name : Build with packages
56
+ env :
57
+ CI : false
58
+ run : ./build.sh -restore -build -ci -pack -testnobuild /bl /p:InstallBrowsersForPlaywright=false
59
+
60
+ - name : Upload built NuGets
61
+ uses : actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 # v4.6.1
62
+ with :
63
+ name : built-nugets
64
+ path : artifacts/packages
47
65
48
66
integrations_test_lin :
49
67
uses : ./.github/workflows/run-tests.yml
56
74
with :
57
75
testShortName : ${{ matrix.shortname }}
58
76
os : " ubuntu-latest"
59
- requiresNugets : ${{ matrix.shortname == 'EndToEnd' }}
60
77
61
78
integrations_test_win :
62
79
uses : ./.github/workflows/run-tests.yml
@@ -69,12 +86,11 @@ jobs:
69
86
with :
70
87
testShortName : ${{ matrix.shortname }}
71
88
os : " windows-latest"
72
- requiresNugets : ${{ matrix.shortname == 'EndToEnd' }}
73
89
74
90
templates_test_lin :
75
91
name : Templates Linux
76
92
uses : ./.github/workflows/run-tests.yml
77
- needs : setup_for_tests_lin
93
+ needs : [ setup_for_tests_lin, build_packages]
78
94
strategy :
79
95
fail-fast : false
80
96
matrix : ${{ fromJson(needs.setup_for_tests_lin.outputs.templates_tests_matrix) }}
@@ -87,11 +103,12 @@ jobs:
87
103
# append '.' to the name so only the test class with exactly that name is run
88
104
extraTestArgs : " --filter FullyQualifiedName~Aspire.Templates.Tests.${{ matrix.shortname }}."
89
105
requiresNugets : true
106
+ requiresTestSdk : true
90
107
91
108
templates_test_win :
92
109
name : Templates Windows
93
110
uses : ./.github/workflows/run-tests.yml
94
- needs : setup_for_tests_win
111
+ needs : [ setup_for_tests_win, build_packages]
95
112
strategy :
96
113
fail-fast : false
97
114
matrix : ${{ fromJson(needs.setup_for_tests_win.outputs.templates_tests_matrix) }}
@@ -104,12 +121,24 @@ jobs:
104
121
# append '.' to the name so only the test class with exactly that name is run
105
122
extraTestArgs : " --filter FullyQualifiedName~Aspire.Templates.Tests.${{ matrix.shortname }}."
106
123
requiresNugets : true
124
+ requiresTestSdk : true
125
+
126
+ endtoend_tests :
127
+ name : EndToEnd ${{ matrix.os }}
128
+ uses : ./.github/workflows/run-tests.yml
129
+ needs : build_packages
130
+ with :
131
+ testShortName : EndToEnd
132
+ # EndToEnd is not run on Windows due to missing Docker support
133
+ os : ubuntu-latest
134
+ testProjectPath : tests/Aspire.EndToEnd.Tests/Aspire.EndToEnd.Tests.csproj
135
+ requiresNugets : true
107
136
108
137
results : # This job is used for branch protection. It ensures all the above tests passed
109
138
if : ${{ always() }}
110
139
runs-on : ubuntu-latest
111
140
name : Final Results
112
- needs : [ integrations_test_lin, integrations_test_win, templates_test_lin, templates_test_win ]
141
+ needs : [ integrations_test_lin, integrations_test_win, templates_test_lin, templates_test_win, endtoend_tests ]
113
142
steps :
114
143
# get all the test-job-result* artifacts into a single directory
115
144
- uses : actions/download-artifact@cc203385981b70ca67e1cc392babf9cc229d5806 # v4.1.9
0 commit comments