Skip to content
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

C#: Also run extractor unit tests on a windows runner. #14333

Merged
merged 4 commits into from Sep 29, 2023

Conversation

michaelnebel
Copy link
Contributor

@michaelnebel michaelnebel commented Sep 28, 2023

In this PR we

  • Add a workflow for running the extractor unit tests on windows. Please note that this requires that we use bash as shell when executing the workflow, otherwise the workflow doesn't stop on failure.
  • Re-write and re-enable the stub generator unit tests.

@github-actions github-actions bot added the C# label Sep 28, 2023
@michaelnebel michaelnebel force-pushed the csharp/windowsunittests branch 6 times, most recently from ff2cb25 to 7544eb2 Compare September 28, 2023 12:06
@michaelnebel michaelnebel marked this pull request as ready for review September 28, 2023 12:44
@michaelnebel michaelnebel requested review from a team as code owners September 28, 2023 12:44
run: |
dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Util.Tests
dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Extraction.Tests
dotnet test -p:RuntimeFrameworkVersion=7.0.2 autobuilder/Semmle.Autobuild.CSharp.Tests
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
unit-tests-windows:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you may be able to use a matrix (containing ubuntu-latest and windows-2019) to reduce duplication.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that is a good idea (TIL). My skills for defining workflows are limited. As far as google informs me the default shell for all other types of runner than windows runners is bash, so setting the default to bash for non-windows test executions should also be fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrite looks great!

@michaelnebel michaelnebel marked this pull request as ready for review September 29, 2023 07:47
@michaelnebel michaelnebel merged commit 81e4cdd into github:main Sep 29, 2023
16 checks passed
@michaelnebel michaelnebel deleted the csharp/windowsunittests branch September 29, 2023 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants