Skip to content

Commit

Permalink
Cleanup green tests after CirrusRedOrg#162.
Browse files Browse the repository at this point in the history
  • Loading branch information
lauxjpn committed Oct 25, 2023
1 parent 28d3758 commit db32e57
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 32 deletions.
32 changes: 19 additions & 13 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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.'
Expand Down Expand Up @@ -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 }}
Expand All @@ -274,15 +272,23 @@ jobs:
$hasGreenTestsArtifacts = (Test-Path 'green-tests') -and (Get-ChildItem 'green-tests').Length -gt 0
echo "hasGreenTestsArtifacts=$hasGreenTestsArtifacts" >> $env:GITHUB_OUTPUT
echo "hasGreenTestsArtifacts: $hasGreenTestsArtifacts"
Status:
Trace:
needs: CheckArtifacts
runs-on: ubuntu-latest
steps:
- name: 'Output Context'
shell: pwsh
run: echo '${{ needs }}'
Status:
needs:
- CheckArtifacts
- Trace
if: needs.CheckArtifacts.outputs.hasGreenTestsArtifacts != 'true'
runs-on: ubuntu-latest
steps:
- name: 'Final Status'
shell: pwsh
run: |
echo '${{ toJson(needs) }}'
echo 'needs.CheckArtifacts.outputs.hasGreenTestsArtifacts: ${{ needs.CheckArtifacts.outputs.hasGreenTestsArtifacts }}'
echo 'All workflows succeeded.'
exit 0
18 changes: 7 additions & 11 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit db32e57

Please sign in to comment.