mirror of
https://github.com/hashicorp/vault.git
synced 2025-08-22 15:11:07 +02:00
Applied Ent Changes (#25160)
This commit is contained in:
parent
99c74f5c80
commit
c60d1ce11a
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@ -335,7 +335,7 @@ jobs:
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "${{ needs.test-go.result != 'failure' && ':white_check_mark:' || ':x:' }} Go tests\n${{ needs.test-go-race.result != 'failure' && ':white_check_mark:' || ':x:' }} Go race tests\n${{ needs.test-go-testonly.result != 'failure' && ':white_check_mark:' || ':x:' }} Go testonly tests\n${{ needs.test-ui.result != 'failure' && ':white_check_mark:' || ':x:' }} UI tests"
|
||||
"text": "${{ needs.test-go.result != 'failure' && ':white_check_mark:' || ':x:' }} Go tests\n${{ needs.test-go-race.result != 'failure' && ':white_check_mark:' || ':x:' }} Go race tests\n\t\t${{ needs.test-go-race.outputs.data-race-failures != '' && ':x:' || ':white_check_mark:' }} Data race tests\n${{ needs.test-go-testonly.result != 'failure' && ':white_check_mark:' || ':x:' }} Go testonly tests\n${{ needs.test-ui.result != 'failure' && ':white_check_mark:' || ':x:' }} UI tests"
|
||||
},
|
||||
"accessory": {
|
||||
"type": "button",
|
||||
@ -409,7 +409,7 @@ jobs:
|
||||
"type": "section",
|
||||
"text": {
|
||||
"type": "mrkdwn",
|
||||
"text": "${{ needs.test-go.result != 'failure' && ':white_check_mark:' || ':x:' }} Go tests\n${{ needs.test-go-fips.result != 'failure' && ':white_check_mark:' || ':x:' }} Go FIPS tests\n${{ needs.test-go-race.result != 'failure' && ':white_check_mark:' || ':x:' }} Go race tests\n${{ needs.test-go-testonly.result != 'failure' && ':white_check_mark:' || ':x:' }} Go testonly tests\n${{ needs.test-ui.result != 'failure' && ':white_check_mark:' || ':x:' }} UI tests"
|
||||
"text": "${{ needs.test-go.result != 'failure' && ':white_check_mark:' || ':x:' }} Go tests\n${{ needs.test-go-fips.result != 'failure' && ':white_check_mark:' || ':x:' }} Go FIPS tests\n${{ needs.test-go-race.result != 'failure' && ':white_check_mark:' || ':x:' }} Go race tests\n\t\t${{ needs.test-go-race.outputs.data-race-failures != '' && ':x:' || ':white_check_mark:' }} Data race tests\n${{ needs.test-go-testonly.result != 'failure' && ':white_check_mark:' || ':x:' }} Go testonly tests\n${{ needs.test-ui.result != 'failure' && ':white_check_mark:' || ':x:' }} UI tests"
|
||||
},
|
||||
"accessory": {
|
||||
"type": "button",
|
||||
|
42
.github/workflows/test-go.yml
vendored
42
.github/workflows/test-go.yml
vendored
@ -72,6 +72,10 @@ on:
|
||||
required: false
|
||||
default: ${{ github.ref }}
|
||||
type: string
|
||||
outputs:
|
||||
data-race-failures:
|
||||
description: A list of failing tests as result of data races
|
||||
value: ${{ jobs.data-race-failures.outputs.data_race_failures }}
|
||||
|
||||
env: ${{ fromJSON(inputs.env-vars) }}
|
||||
|
||||
@ -496,6 +500,44 @@ jobs:
|
||||
name: failure-summary
|
||||
path: failure-summary-${{ matrix.id }}${{ inputs.name != '' && '-' || '' }}${{inputs.name}}.md
|
||||
|
||||
data-race-failures:
|
||||
if: ${{ ! cancelled() && needs.test-go.result == 'failure' && inputs.name == 'race' }}
|
||||
needs: test-go
|
||||
runs-on: ${{ fromJSON(inputs.runs-on) }}
|
||||
steps:
|
||||
- uses: actions/download-artifact@9bc31d5ccc31df68ecc42ccf4149144866c47d8a # v3.0.2
|
||||
with:
|
||||
name: test-results
|
||||
path: race-results
|
||||
- name: Check data race failure
|
||||
id: data-race-failure
|
||||
run: |
|
||||
directory=race-results
|
||||
|
||||
# Use a for loop to iterate over files in the directory
|
||||
data_race_tests=()
|
||||
for file in "$directory"/*.json; do
|
||||
# Check if test results contains offending phrase
|
||||
if grep -q "WARNING: DATA RACE" "$file"; then
|
||||
test_number="$(grep -oE '[0-9]+' <<< "$file")"
|
||||
data_race_tests+=("test-go (${test_number})")
|
||||
|
||||
# Print failing matrix tests
|
||||
echo "=============== test-go (${test_number}) ==========================="
|
||||
sed -n '/WARNING: DATA RACE/,/==================/p' "$file" | jq -r -j '.Output'
|
||||
fi
|
||||
done
|
||||
|
||||
# Set variable
|
||||
echo -n "data_race_failures=${data_race_tests[*]}" >> "$GITHUB_OUTPUT"
|
||||
|
||||
# Fail the action if there were any failed race tests
|
||||
if (("${#data_race_tests[@]}" > 0)); then
|
||||
exit 1
|
||||
fi
|
||||
outputs:
|
||||
data_race_failures : ${{ steps.data-race-failure.outputs.data_race_failures }}
|
||||
|
||||
test-collect-reports:
|
||||
if: ${{ ! cancelled() && needs.test-go.result == 'success' && inputs.test-timing-cache-enabled }}
|
||||
needs: test-go
|
||||
|
Loading…
x
Reference in New Issue
Block a user