From f38d9a3d7ef927e035f673e35d4105cd3fe0f78e Mon Sep 17 00:00:00 2001 From: marceloduplicati Date: Thu, 13 Feb 2025 17:01:58 -0300 Subject: [PATCH] Terminal Adding CIFS to CI (#5971) Adding CIFS to CI --- .github/workflows/backendtests.yml | 37 +++++++++++++++++++ .../Duplicati.Backend.Tests/CIFS/CIFSTests.cs | 3 ++ LiveTests/Duplicati.Backend.Tests/README.md | 3 +- 3 files changed, 42 insertions(+), 1 deletion(-) diff --git a/.github/workflows/backendtests.yml b/.github/workflows/backendtests.yml index 78f67df04..7d380f725 100644 --- a/.github/workflows/backendtests.yml +++ b/.github/workflows/backendtests.yml @@ -416,3 +416,40 @@ jobs: dotnet test --no-build --filter="ClassName~GoogleDriveTests" --logger:"console;verbosity=detailed" LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln + test_cifs: + needs: check_secrets + if: needs.check_secrets.outputs.testcontainers_secrets_available == 'true' + name: CIFS 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 CIFS tests + run: >- + dotnet test --no-build --filter="ClassName~CIFSTests" + --logger:"console;verbosity=detailed" + LiveTests/Duplicati.Backend.Tests/Duplicati.Backend.Tests.sln \ No newline at end of file diff --git a/LiveTests/Duplicati.Backend.Tests/CIFS/CIFSTests.cs b/LiveTests/Duplicati.Backend.Tests/CIFS/CIFSTests.cs index cedf8ac0b..d7547f52b 100644 --- a/LiveTests/Duplicati.Backend.Tests/CIFS/CIFSTests.cs +++ b/LiveTests/Duplicati.Backend.Tests/CIFS/CIFSTests.cs @@ -19,6 +19,8 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. +using DotNet.Testcontainers.Images; + namespace Duplicati.Backend.Tests.CIFS; /// @@ -71,6 +73,7 @@ smbd --foreground --no-process-group --debug-stdout"; var container = new ContainerBuilder() .WithImage("ubuntu:22.04") + .WithImagePullPolicy(PullPolicy.Missing) .WithCommand("/bin/bash", "-c", "apt-get update && " + "DEBIAN_FRONTEND=noninteractive apt-get install -y samba && " + "bash /etc/samba/entrypoint.sh") diff --git a/LiveTests/Duplicati.Backend.Tests/README.md b/LiveTests/Duplicati.Backend.Tests/README.md index 824d8e70a..4b1d21ed1 100644 --- a/LiveTests/Duplicati.Backend.Tests/README.md +++ b/LiveTests/Duplicati.Backend.Tests/README.md @@ -25,7 +25,8 @@ NUMBER_OF_FILES default is 20 | Dropbox | Planned | Live | | AlternativeFTP | Planned | Live | | AzureBlob | Planned | Live | -| CIFS | Planned | | +| CIFS | Planned | Live | +| Google Drive | Planned | Live | | TahoeLAFS | Pending Decision | | | TescentCOS | Pending Decision | | | Storj | Pending Decision | |