From 07b133d7dc514df9ba9d19eaa52a98dca431000f Mon Sep 17 00:00:00 2001 From: Laurents Meyer Date: Mon, 23 Oct 2023 13:33:32 +0200 Subject: [PATCH] Cleanup green tests after #162. --- .github/workflows/pull_request.yml | 21 ++++++++----------- .github/workflows/push.yml | 18 +++++++--------- .../GreenTests/ace_2010_odbc_x86.txt | 1 - .../GreenTests/ace_2010_oledb_x86.txt | 7 ------- 4 files changed, 16 insertions(+), 31 deletions(-) diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 3a22e4a4..4ec1bd31 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -9,6 +9,7 @@ env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_NOLOGO: true + checkoutFetchDepth: 2 buildConfiguration: 'Debug' skipTests: false deterministicTests: true @@ -25,30 +26,26 @@ jobs: shell: pwsh run: | echo 'EventName: ${{ github.event_name }}' -# - name: 'Log Event Context' -# shell: pwsh -# run: | -# echo '${{ toJson(github.event) }}' - name: Checkout uses: actions/checkout@v3 with: - fetch-depth: 2 + fetch-depth: ${{ env.checkoutFetchDepth }} - name: 'Get Head Commit Info' id: GetHeadCommitInfo shell: pwsh run: | - git log -2 --pretty=%B + git log -${{ env.checkoutFetchDepth }} --pretty=%B - $headCommitMessage = git log -1 --skip 1 --pretty=%B + $headCommitMessage = git log -1 --skip "$(${{ env.checkoutFetchDepth }} - 1)" --pretty=%B echo "headCommitMessage: = $headCommitMessage" - $headCommitAuthorName = git log -1 --skip 1 --pretty=%an + $headCommitAuthorName = git log -1 --skip "$(${{ env.checkoutFetchDepth }} - 1)" --pretty=%an echo "headCommitAuthorName: = $headCommitAuthorName" - $headCommitAuthorEmail = git log -1 --skip 1 --pretty=%ae + $headCommitAuthorEmail = git log -1 --skip "$(${{ env.checkoutFetchDepth }} - 1)" --pretty=%ae echo "headCommitAuthorEmail: = $headCommitAuthorEmail" - $headCommitDateTime = Get-Date (git log -1 --skip 1 --pretty=%ci) + $headCommitDateTime = Get-Date (git log -1 --skip "$(${{ env.checkoutFetchDepth }} - 1)" --pretty=%ci) echo "headCommitDateTime: = $headCommitDateTime" $lastCommitIsAutoCommit = $headCommitAuthorEmail -eq 'github-actions@github.com' -and $headCommitMessage -eq '[GitHub Actions] Update green tests.' @@ -248,13 +245,14 @@ jobs: } echo 'Check succeeded.' - name: 'Upload Green Tests' - if: env.commitGreenTestsFile != '' + if: env.commitGreenTestsFile != '' && env.autoCommitGreenTests == 'true' uses: actions/upload-artifact@v3 with: name: green-tests path: ${{ env.commitGreenTestsFile }} CheckArtifacts: needs: BuildAndTest + if: always() runs-on: ubuntu-latest outputs: hasGreenTestsArtifacts: ${{ steps.CheckGreenTestsArtifacts.outputs.hasGreenTestsArtifacts }} @@ -282,7 +280,6 @@ jobs: - name: 'Final Status' shell: pwsh run: | - echo '${{ toJson(needs) }}' echo 'needs.CheckArtifacts.outputs.hasGreenTestsArtifacts: ${{ needs.CheckArtifacts.outputs.hasGreenTestsArtifacts }}' echo 'All workflows succeeded.' exit 0 diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index a4aaef9b..d1b9a1b3 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -9,10 +9,10 @@ env: DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true DOTNET_CLI_TELEMETRY_OPTOUT: true DOTNET_NOLOGO: true + checkoutFetchDepth: 1 buildConfiguration: 'Debug' skipTests: false deterministicTests: true - autoCommitGreenTests: true uploadTestResults: false jobs: Preconditions: @@ -25,30 +25,26 @@ jobs: shell: pwsh run: | echo 'EventName: ${{ github.event_name }}' -# - name: 'Log Event Context' -# shell: pwsh -# run: | -# echo '${{ toJson(github.event) }}' - name: Checkout uses: actions/checkout@v3 with: - fetch-depth: 1 + fetch-depth: ${{ env.checkoutFetchDepth }} - name: 'Get Head Commit Info' id: GetHeadCommitInfo shell: pwsh run: | - git log -1 --pretty=%B + git log -${{ env.checkoutFetchDepth }} --pretty=%B - $headCommitMessage = git log -1 --pretty=%B + $headCommitMessage = git log -1 --skip "$(${{ env.checkoutFetchDepth }} - 1)" --pretty=%B echo "headCommitMessage: = $headCommitMessage" - $headCommitAuthorName = git log -1 --pretty=%an + $headCommitAuthorName = git log -1 --skip "$(${{ env.checkoutFetchDepth }} - 1)" --pretty=%an echo "headCommitAuthorName: = $headCommitAuthorName" - $headCommitAuthorEmail = git log -1 --pretty=%ae + $headCommitAuthorEmail = git log -1 --skip "$(${{ env.checkoutFetchDepth }} - 1)" --pretty=%ae echo "headCommitAuthorEmail: = $headCommitAuthorEmail" - $headCommitDateTime = Get-Date (git log -1 --pretty=%ci) + $headCommitDateTime = Get-Date (git log -1 --skip "$(${{ env.checkoutFetchDepth }} - 1)" --pretty=%ci) echo "headCommitDateTime: = $headCommitDateTime" $lastCommitIsAutoCommit = $headCommitAuthorEmail -eq 'github-actions@github.com' -and $headCommitMessage -eq '[GitHub Actions] Update green tests.' diff --git a/test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_odbc_x86.txt b/test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_odbc_x86.txt index c73777dc..6d99898f 100644 --- a/test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_odbc_x86.txt +++ b/test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_odbc_x86.txt @@ -12454,7 +12454,6 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.PrimitiveCollectionsQueryJetTest.P EntityFrameworkCore.Jet.FunctionalTests.Query.PrimitiveCollectionsQueryJetTest.Project_multiple_collections(async: True) EntityFrameworkCore.Jet.FunctionalTests.Query.PrimitiveCollectionsQueryJetTest.Project_primitive_collections_element(async: False) EntityFrameworkCore.Jet.FunctionalTests.Query.PrimitiveCollectionsQueryJetTest.Project_primitive_collections_element(async: True) -EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Access_property_of_closure_6864 EntityFrameworkCore.Jet.FunctionalTests.Query.QueryFilterFuncletizationJetTest.DbContext_complex_expression_is_parameterized EntityFrameworkCore.Jet.FunctionalTests.Query.QueryFilterFuncletizationJetTest.DbContext_field_is_parameterized EntityFrameworkCore.Jet.FunctionalTests.Query.QueryFilterFuncletizationJetTest.DbContext_list_is_parameterized diff --git a/test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_oledb_x86.txt b/test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_oledb_x86.txt index 58fba0f9..1899554a 100644 --- a/test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_oledb_x86.txt +++ b/test/EFCore.Jet.FunctionalTests/GreenTests/ace_2010_oledb_x86.txt @@ -15421,16 +15421,9 @@ EntityFrameworkCore.Jet.FunctionalTests.Query.PrimitiveCollectionsQueryJetTest.P EntityFrameworkCore.Jet.FunctionalTests.Query.PrimitiveCollectionsQueryJetTest.Project_multiple_collections(async: True) EntityFrameworkCore.Jet.FunctionalTests.Query.PrimitiveCollectionsQueryJetTest.Project_primitive_collections_element(async: False) EntityFrameworkCore.Jet.FunctionalTests.Query.PrimitiveCollectionsQueryJetTest.Project_primitive_collections_element(async: True) -EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Access_property_of_closure_6864 EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Average_with_cast -EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Byte_enum_has_flag_does_not_apply_explicit_cast_for_non_constant -EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Call_method_on_closure_6864 -EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Cast_to_implemented_interface_is_removed_from_expression_tree -EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Cast_to_object_is_removed_from_expression_tree EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Compiler_generated_local_closure_produces_valid_parameter_name_1742 EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Correlated_collection_correctly_associates_entities_with_byte_array_keys -EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Correlated_collection_with_OfType_base -EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Correlated_collection_works_when_defined_on_intermediate_type EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.Customer_collections_materialize_properly_3758 EntityFrameworkCore.Jet.FunctionalTests.Query.QueryBugsTest.DateTime_Contains_with_smalldatetime_generates_correct_literal EntityFrameworkCore.Jet.FunctionalTests.Query.QueryFilterFuncletizationJetTest.DbContext_complex_expression_is_parameterized