tests: fix and enable s3 snapshot test (#3720)

* test: fix s3 snapshot test

* ci: configure s3 regression test

* tests: only run s3 snapshot test if bucket not empty
This commit is contained in:
Andy Dunstall 2024-09-17 15:35:53 +01:00 committed by GitHub
parent 8a34b3e730
commit a64fc74ce1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 24 additions and 5 deletions

View file

@ -19,6 +19,15 @@ inputs:
filter:
required: false
type: string
aws-access-key-id:
required: true
type: string
aws-secret-access-key:
required: true
type: string
s3-bucket:
required: true
type: string
runs:
using: "composite"
@ -56,6 +65,12 @@ runs:
if [[ $code -ne 0 ]]; then
exit 1
fi
env:
# Add environment variables to enable the S3 snapshot test.
DRAGONFLY_S3_BUCKET: ${{ inputs.s3-bucket }}
AWS_ACCESS_KEY_ID: ${{ inputs.aws-access-key-id }}
AWS_SECRET_ACCESS_KEY: ${{ inputs.aws-secret-access-key }}
AWS_REGION: us-east-1
- name: Send notification on failure
if: failure() && github.ref == 'refs/heads/main'

View file

@ -45,6 +45,9 @@ jobs:
gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }}
build-folder-name: build
filter: ${{ matrix.build-type == 'Release' && 'not dbg_only' || 'not opt_only' }}
aws-access-key-id: ${{ secrets.AWS_S3_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_S3_ACCESS_SECRET }}
s3-bucket: ${{ secrets.S3_REGTEST_BUCKET }}
- name: Upload logs on failure
if: failure()