-
Notifications
You must be signed in to change notification settings - Fork 539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added github action to run a subset of tests #7328
Merged
Merged
Changes from 29 commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
1a92bf2
Added github action to run a subset of tests
davidfowl d0b40fa
SkipUnstableEmulators
davidfowl 7de7b5b
Fix pgweb test
davidfowl ff793b5
Try ci true
davidfowl 8035758
Get the bin log
davidfowl b8a8bd5
Fix?
davidfowl cebd69b
??
davidfowl 7ebc84a
Moar perms
davidfowl 99b99b5
This?
davidfowl 2f67e91
ContinuousIntegrationBuild
davidfowl 4368467
Remove CIBuild property since this isn't running in AzDO
eerhardt d9c6533
Try using build.sh instead to restore arcade
joperezr e01943c
Remove from tests too
eerhardt 3c0eedd
Merge branch 'davidfowl/gha-experiment2' of https://github.com/dotnet…
joperezr f4abeb8
Merge branch 'davidfowl/gha-experiment2' of https://github.com/dotnet…
joperezr 153a35c
Remove -ci
joperezr e755d06
create binlog to upload
joperezr 59542dc
Try setting CI to false
joperezr a85052b
Fix
joperezr 9a556d5
Add missing projects parameter
joperezr b0c1a42
append githubworkspace to project path
joperezr 3a94f59
Add missing dollar sign
joperezr 8c1cf50
Fix test step
joperezr c7cbdbc
Skip Oracle tests that shouldn't run based on ActiveIssue
joperezr c35db47
Skipping Aspire.Hosting.Test
joperezr 7465c9f
Stop building all of the repo and try to fix test not being able to f…
joperezr 62df1fe
Debug Output for AzureFunctionsTest
joperezr 801075a
Enabling project reference which is currently disabled.
joperezr 026d09c
Disable Azure Functions test from CI
joperezr 6bbf7e0
Disabling playground tests to investigate Azure Functions test
joperezr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Run Integration Tests | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- project: tests/Aspire.Hosting.Elasticsearch.Tests/Aspire.Hosting.Elasticsearch.Tests.csproj | ||
name: Elasticsearch | ||
- project: tests/Aspire.Hosting.PostgreSQL.Tests/Aspire.Hosting.PostgreSQL.Tests.csproj | ||
name: PostgreSQL | ||
- project: tests/Aspire.Hosting.Oracle.Tests/Aspire.Hosting.Oracle.Tests.csproj | ||
name: Oracle | ||
- project: tests/Aspire.Hosting.Kafka.Tests/Aspire.Hosting.Kafka.Tests.csproj | ||
name: Kafka | ||
- project: tests/Aspire.Hosting.Tests/Aspire.Hosting.Tests.csproj | ||
name: Hosting | ||
- project: tests/Aspire.Hosting.Redis.Tests/Aspire.Hosting.Redis.Tests.csproj | ||
name: Redis | ||
- project: tests/Aspire.Hosting.Azure.Tests/Aspire.Hosting.Azure.Tests.csproj | ||
name: Azure | ||
- project: tests/Aspire.Playground.Tests/Aspire.Playground.Tests.csproj | ||
name: Playground | ||
# Add more projects as needed | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up .NET Core | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
dotnet-version: | | ||
8.x | ||
9.x | ||
|
||
- name: Trust HTTPS development certificate | ||
run: dotnet dev-certs https --trust | ||
|
||
- name: Verify Docker is running | ||
run: docker info | ||
|
||
- name: Install Azure Functions Core Tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y azure-functions-core-tools-4 | ||
|
||
- name: Build test project | ||
run: | | ||
export CI=false && ./build.sh -restore -ci -build -projects ${{ github.workspace }}/${{ matrix.project }} /bl | ||
|
||
- name: Run tests | ||
id: run-tests | ||
run: | | ||
export CI=false && ./dotnet.sh test ${{ github.workspace }}/${{ matrix.project }} \ | ||
/p:ContinuousIntegrationBuild=true \ | ||
-s eng/testing/.runsettings \ | ||
--logger "console;verbosity=normal" \ | ||
--logger "trx" \ | ||
--logger html \ | ||
--blame \ | ||
--blame-hang-timeout 7m \ | ||
--results-directory testresults \ | ||
--no-restore \ | ||
--no-build | ||
|
||
- name: Compress test results | ||
if: always() | ||
run: zip -r testresults.zip testresults | ||
|
||
- name: Upload bin log artifact | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: binlog-${{ matrix.name }} | ||
path: "**/*.binlog" | ||
|
||
- name: Upload test results artifact | ||
if: always() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: testresults-${{ matrix.name }} | ||
path: testresults.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@captainsafia looks like this test hasn't been running on CI as the P2P has been conditioned out when
-ci
flag is passed to the build, is that intentional?https://github.com/dotnet/aspire/blob/1edf95d2f236fccff2d7b9c9cb54d7da88eb7b2e/tests/Aspire.Playground.Tests/Aspire.Playground.Tests.csproj#L51C54-L51C76
This change is just making it so that it is explicitly skipped so GHA doesn't try to run it but please let me know if that's wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💀 No...I'm a little surprised at this. Is that
-ci
flag actually set? Here are the test analytics for this test over the last 30 days off the main branch:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is for the whole workitem (meaning the whole test assembly as opposed to the single test) though, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ci
flag is set in our pipeline builds so that P2P wouldn't be included, meaning this test would fail like it did in this PR, so I'm guessing it is getting skipped by some different means.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I accidentally cropped it from the image but its for the
AzureFunctionsTest
in particular:I think we should remove the constraint in the project file since this test should be running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did try that and it wasn't working for some reason. Anyway, for the sake of incremental progress I'll go ahead and not run playground tests in GHA for now and we can add that back in a follow up. That will enable the rest of the tests to start running in GHA.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be curious for what is happening in helix, I do have a hunch that the test is not running since I'm sure we pass -ci to our tests, so perhaps the Requires func attribute is making the test still shown as run but actually skipped dynamically? I can take a closer look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, looks like playground tests actually don't build on the build machine and instead get built directly on Helix, and in there it seems like they don't pass -ci, so the test might indeed be running after all