Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
erikbra committed Apr 22, 2024
1 parent d4e2d60 commit a6d7e38
Showing 1 changed file with 30 additions and 36 deletions.
66 changes: 30 additions & 36 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -367,10 +367,7 @@ jobs:
run: |
$env:GrateTestConfig__AdminConnectionString="$([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String( "${{ matrix.database.connectionstring }}" )) )";
# Copy the DLL to a different name to get better test result names (stupid, I know)
cp integration-tests/${{ matrix.os.arch }}/${{ matrix.database.type }}.dll integration-tests/${{ matrix.os.arch }}/${{ matrix.database.cleaned_name }}.${{ matrix.os.arch }}.dll
dotnet test integration-tests/${{ matrix.os.arch }}/${{ matrix.database.cleaned_name }}.${{ matrix.os.arch }}.dll `
dotnet test integration-tests/${{ matrix.os.arch }}/${{ matrix.database.type }}.dll `
--logger:"xunit;LogFilePath=/tmp/test-results/${{ matrix.os.arch }}/${{ matrix.database.cleaned_name }}.xml" -- `
-MaxCpuCount 2
Expand All @@ -385,10 +382,7 @@ jobs:
run: |
$env:GrateTestConfig__AdminConnectionString="$([System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String( "${{ matrix.database.connectionstring }}" )) )";
# Copy the DLL to a different name to get better test result names (stupid, I know)
cp integration-tests/${{ matrix.os.arch }}/CommandLine.${{ matrix.database.type }}.dll integration-tests/${{ matrix.os.arch }}/CommandLine.${{ matrix.database.cleaned_name }}.${{ matrix.os.arch }}.dll
dotnet test integration-tests/${{ matrix.os.arch }}/CommandLine.${{ matrix.database.cleaned_name }}.${{ matrix.os.arch }}.dll `
dotnet test integration-tests/${{ matrix.os.arch }}/CommandLine.${{ matrix.database.type }}.dll `
--logger:"xunit;LogFilePath=/tmp/test-results/${{ matrix.os.arch }}/CommandLine.${{ matrix.database.cleaned_name }}.xml" -- `
-MaxCpuCount 2
Expand All @@ -407,16 +401,16 @@ jobs:
/tmp/test-results/${{ matrix.os.arch }}/CommandLine.${{ matrix.database.cleaned_name }}.xml
retention-days: 1

- name: Fail build if not successful
id: fail-if-failed
run: |
[ "${FAILURE}" = "true" ] && echo "Failures found. Marking as failed" && exit 1;
[ "${CANCELLED}" = "true" ] && echo "Job cancelled. Marking as failed" && exit 1;
if: always()
#if: contains(steps.*.result, 'failure') || contains(steps.*.result, 'cancelled')
env:
FAILURE: ${{ contains(steps.*.result, 'failure') }}
CANCELLED: ${{ contains(steps.*.result, 'cancelled') }}
# - name: Fail build if not successful
# id: fail-if-failed
# run: |
# [ "${FAILURE}" = "true" ] && echo "Failures found. Marking as failed" && exit 1;
# [ "${CANCELLED}" = "true" ] && echo "Job cancelled. Marking as failed" && exit 1;
# if: always()
# #if: contains(steps.*.result, 'failure') || contains(steps.*.result, 'cancelled')
# env:
# FAILURE: ${{ contains(steps.*.result, 'failure') }}
# CANCELLED: ${{ contains(steps.*.result, 'cancelled') }}

report:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -525,22 +519,22 @@ jobs:
#run: terraform apply -destroy -auto-approve
run: terraform destroy -auto-approve

fail-if-failed:
name: Fail build on failure
if: always()
needs:
- integration-test
- teardown-test-environment
runs-on: ubuntu-latest
steps:
- name: Fail build if not successful
id: fail-if-failed
run: |
[ "${FAILURE}" = "true" ] && echo "Failures found. Marking as failed" && exit 1;
[ "${CANCELLED}" = "true" ] && echo "Job cancelled. Marking as failed" && exit 1;
if: always()
#if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
env:
FAILURE: ${{ contains(needs.*.result, 'failure') }}
CANCELLED: ${{ contains(needs.*.result, 'cancelled') }}
# fail-if-failed:
# name: Fail build on failure
# if: always()
# needs:
# - integration-test
# - teardown-test-environment
# runs-on: ubuntu-latest
# steps:
# - name: Fail build if not successful
# id: fail-if-failed
# run: |
# [ "${FAILURE}" = "true" ] && echo "Failures found. Marking as failed" && exit 1;
# [ "${CANCELLED}" = "true" ] && echo "Job cancelled. Marking as failed" && exit 1;
# if: always()
# #if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
# env:
# FAILURE: ${{ contains(needs.*.result, 'failure') }}
# CANCELLED: ${{ contains(needs.*.result, 'cancelled') }}

0 comments on commit a6d7e38

Please sign in to comment.