Adding Live backend tests
These tests are not unit tests but actual backup tests to backends (both cloud and self hosted containers).
This commit is contained in:
@@ -0,0 +1,289 @@
|
||||
name: Backend Live Tests
|
||||
'on':
|
||||
- push
|
||||
- pull_request
|
||||
jobs:
|
||||
check_secrets:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
s3_secrets_available: '${{ steps.check_s3.outputs.available }}'
|
||||
dropbox_secrets_available: '${{ steps.check_dropbox.outputs.available }}'
|
||||
azure_secrets_available: '${{ steps.check_azure.outputs.available }}'
|
||||
steps:
|
||||
- id: check_s3
|
||||
name: Check S3 secrets
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Starting S3 secrets check..."
|
||||
if [[ -n "${{ secrets.TESTCREDENTIAL_S3_BUCKETNAME }}" ]] && \
|
||||
[[ -n "${{ secrets.TESTCREDENTIAL_S3_KEY }}" ]] && \
|
||||
[[ -n "${{ secrets.TESTCREDENTIAL_S3_REGION }}" ]] && \
|
||||
[[ -n "${{ secrets.TESTCREDENTIAL_S3_SECRET }}" ]]; then
|
||||
echo "All S3 secrets found"
|
||||
echo "available=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Missing some S3 secrets"
|
||||
echo "available=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "S3 check completed"
|
||||
- id: check_dropbox
|
||||
name: Check Dropbox secrets
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Starting Dropbox secrets check..."
|
||||
if [[ -n "${{ secrets.TESTCREDENTIAL_DROPBOX_FOLDER }}" ]] && \
|
||||
[[ -n "${{ secrets.TESTCREDENTIAL_DROPBOX_TOKEN }}" ]]; then
|
||||
echo "All Dropbox secrets found"
|
||||
echo "available=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Missing some Dropbox secrets"
|
||||
echo "available=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "Dropbox check completed"
|
||||
- id: check_azure
|
||||
name: Check Azure secrets
|
||||
shell: bash
|
||||
run: |
|
||||
echo "Starting Azure secrets check..."
|
||||
if [[ -n "${{ secrets.TESTCREDENTIAL_AZURE_ACCOUNTNAME }}" ]] && \
|
||||
[[ -n "${{ secrets.TESTCREDENTIAL_AZURE_ACCESSKEY }}" ]] && \
|
||||
[[ -n "${{ secrets.TESTCREDENTIAL_AZURE_CONTAINERNAME }}" ]]; then
|
||||
echo "All Azure secrets found"
|
||||
echo "available=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "Missing some Azure secrets"
|
||||
echo "available=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
echo "Azure check completed"
|
||||
- name: Debug Output
|
||||
shell: bash
|
||||
run: |
|
||||
echo "S3 Available: ${{ steps.check_s3.outputs.available }}"
|
||||
echo "Dropbox Available: ${{ steps.check_dropbox.outputs.available }}"
|
||||
|
||||
|
||||
test_ftp:
|
||||
name: FTP Tests
|
||||
runs-on: '${{ matrix.os }}'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
- name: Restore NuGet dependencies
|
||||
run: >-
|
||||
dotnet restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Build project
|
||||
run: >-
|
||||
dotnet build --no-restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Setup Testcontainers Cloud Client
|
||||
uses: atomicjar/testcontainers-cloud-setup-action@v1
|
||||
with:
|
||||
token: '${{ secrets.TC_CLOUD_TOKEN }}'
|
||||
- name: Run FTP tests
|
||||
env:
|
||||
TC_CLOUD_TOKEN: '${{ secrets.TC_CLOUD_TOKEN }}'
|
||||
run: >-
|
||||
dotnet test --no-build --filter="ClassName~FtpTests"
|
||||
--logger:"console;verbosity=detailed"
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
test_s3:
|
||||
needs: check_secrets
|
||||
if: needs.check_secrets.outputs.s3_secrets_available == 'true'
|
||||
name: S3 Tests
|
||||
runs-on: '${{ matrix.os }}'
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
- name: Restore NuGet dependencies
|
||||
run: >-
|
||||
dotnet restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Build project
|
||||
run: >-
|
||||
dotnet build --no-restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Run S3 tests
|
||||
env:
|
||||
TC_CLOUD_TOKEN: '${{ secrets.TC_CLOUD_TOKEN }}'
|
||||
TESTCREDENTIAL_S3_BUCKETNAME: '${{ secrets.TESTCREDENTIAL_S3_BUCKETNAME }}'
|
||||
TESTCREDENTIAL_S3_KEY: '${{ secrets.TESTCREDENTIAL_S3_KEY }}'
|
||||
TESTCREDENTIAL_S3_REGION: '${{ secrets.TESTCREDENTIAL_S3_REGION }}'
|
||||
TESTCREDENTIAL_S3_SECRET: '${{ secrets.TESTCREDENTIAL_S3_SECRET }}'
|
||||
run: >-
|
||||
dotnet test --no-build --filter="ClassName~S3Tests"
|
||||
--logger:"console;verbosity=detailed"
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
test_azure:
|
||||
needs: check_secrets
|
||||
if: needs.check_secrets.outputs.azure_secrets_available == 'true'
|
||||
name: Azure Tests
|
||||
runs-on: '${{ matrix.os }}'
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
- name: Restore NuGet dependencies
|
||||
run: >-
|
||||
dotnet restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Build project
|
||||
run: >-
|
||||
dotnet build --no-restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Run Azure tests
|
||||
env:
|
||||
TESTCREDENTIAL_AZURE_ACCOUNTNAME: '${{ secrets.TESTCREDENTIAL_AZURE_ACCOUNTNAME }}'
|
||||
TESTCREDENTIAL_AZURE_ACCESSKEY: '${{ secrets.TESTCREDENTIAL_AZURE_ACCESSKEY }}'
|
||||
TESTCREDENTIAL_AZURE_CONTAINERNAME: '${{ secrets.TESTCREDENTIAL_AZURE_CONTAINERNAME }}'
|
||||
run: >-
|
||||
dotnet test --no-build --filter="ClassName~AzureTests"
|
||||
--logger:"console;verbosity=detailed"
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
|
||||
test_webdav:
|
||||
name: Webdav Tests
|
||||
runs-on: '${{ matrix.os }}'
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
- name: Restore NuGet dependencies
|
||||
run: >-
|
||||
dotnet restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Build project
|
||||
run: >-
|
||||
dotnet build --no-restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Setup Testcontainers Cloud Client
|
||||
uses: atomicjar/testcontainers-cloud-setup-action@v1
|
||||
with:
|
||||
token: '${{ secrets.TC_CLOUD_TOKEN }}'
|
||||
- name: Run Webdav tests
|
||||
env:
|
||||
TC_CLOUD_TOKEN: '${{ secrets.TC_CLOUD_TOKEN }}'
|
||||
run: >-
|
||||
dotnet test --no-build --filter="ClassName~WebDavTests"
|
||||
--logger:"console;verbosity=detailed"
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
test_dropbox:
|
||||
needs: check_secrets
|
||||
if: needs.check_secrets.outputs.dropbox_secrets_available == 'true'
|
||||
name: DropBox Tests
|
||||
runs-on: '${{ matrix.os }}'
|
||||
strategy:
|
||||
max-parallel: 1
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
- name: Restore NuGet dependencies
|
||||
run: >-
|
||||
dotnet restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Build project
|
||||
run: >-
|
||||
dotnet build --no-restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Run Dropbox tests
|
||||
env:
|
||||
TC_CLOUD_TOKEN: '${{ secrets.TC_CLOUD_TOKEN }}'
|
||||
TESTCREDENTIAL_DROPBOX_FOLDER: '${{ secrets.TESTCREDENTIAL_DROPBOX_FOLDER }}'
|
||||
TESTCREDENTIAL_DROPBOX_TOKEN: '${{ secrets.TESTCREDENTIAL_DROPBOX_TOKEN }}'
|
||||
run: >-
|
||||
dotnet test --no-build --filter="ClassName~DropBoxTests"
|
||||
--logger:"console;verbosity=detailed"
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
test_ssh:
|
||||
name: SSH Tests
|
||||
runs-on: '${{ matrix.os }}'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 1
|
||||
matrix:
|
||||
os:
|
||||
- ubuntu-latest
|
||||
- windows-latest
|
||||
- macos-latest
|
||||
steps:
|
||||
- name: Set up .NET
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
- name: Checkout source
|
||||
uses: actions/checkout@v4
|
||||
- name: Restore NuGet dependencies
|
||||
run: >-
|
||||
dotnet restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Build project
|
||||
run: >-
|
||||
dotnet build --no-restore
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
- name: Setup Testcontainers Cloud Client
|
||||
uses: atomicjar/testcontainers-cloud-setup-action@v1
|
||||
with:
|
||||
token: '${{ secrets.TC_CLOUD_TOKEN }}'
|
||||
- name: Run SSH tests
|
||||
env:
|
||||
TC_CLOUD_TOKEN: '${{ secrets.TC_CLOUD_TOKEN }}'
|
||||
run: >-
|
||||
dotnet test --no-build --filter="ClassName~SshTests"
|
||||
--logger:"console;verbosity=detailed"
|
||||
LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln
|
||||
Reference in New Issue
Block a user