Merge branch 'master' into feature/add-playwright-tests

This commit is contained in:
Kenneth Skovhede
2025-11-04 21:40:24 +01:00
committed by GitHub
8 changed files with 494 additions and 144 deletions
+2
View File
@@ -2,6 +2,8 @@ name: Backend Live Tests
on: [pull_request, workflow_dispatch]
permissions:
contents: read
issues: none
pull-requests: none
concurrency:
group: duplicati-ci-livetests
cancel-in-progress: false
+4
View File
@@ -1,4 +1,8 @@
name: Tests
permissions:
contents: read
issues: none
pull-requests: none
on: [pull_request, workflow_dispatch]
-143
View File
@@ -1,143 +0,0 @@
name: Freebsd
on:
push:
branches: "**freebsd**"
pull_request:
branches: "**freebsd**"
jobs:
zip:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Download dotnet
# See also https://github.com/sec/dotnet-core-freebsd-source-build
# See also https://github.com/Thefrank/dotnet-freebsd-crossbuild
run: curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/v6.0.401-11/dotnet-sdk-6.0.401-freebsd-x64.tar.gz -o dn.tgz
- name: Build
id: test
uses: vmactions/freebsd-vm@v0
with:
usesh: true
# sync: sshfs
prepare: pkg install -y curl libinotify libunwind git cmake ninja bash wget icu
run: |
#!/bin/bash
set -x
set -e
pwd
ls -lah
whoami
env
freebsd-version
df -h
dmesg | grep memory
swapinfo
dd if=/dev/zero of=/root/swap1 bs=1m count=20480
chmod 0600 /root/swap1
mdconfig -a -t vnode -f /root/swap1 -u 0
swapon /dev/md0
df -h
swapinfo
export DOTNET_CLI_TELEMETRY_OPTOUT=1
BUILD_DIR=`pwd`
cd /var/tmp
mkdir dn
cd dn
echo Unpacking .NET
tar -xzf ${BUILD_DIR}/dn.tgz
cd ${BUILD_DIR}
mkdir /var/tmp/nuget
export RVERSION=v6.0.401-11
export VERSION=6.0.9
curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/${RVERSION}/Microsoft.AspNetCore.App.Runtime.freebsd-x64.${VERSION}.nupkg -o /var/tmp/nuget/Microsoft.AspNetCore.App.Runtime.freebsd-x64.${VERSION}.nupkg
curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/${RVERSION}/Microsoft.NETCore.App.Host.freebsd-x64.${VERSION}.nupkg -o /var/tmp/nuget/Microsoft.NETCore.App.Host.freebsd-x64.${VERSION}.nupkg
curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/${RVERSION}/Microsoft.NETCore.App.Runtime.freebsd-x64.${VERSION}.nupkg -o /var/tmp/nuget/Microsoft.NETCore.App.Runtime.freebsd-x64.${VERSION}.nupkg
curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/${RVERSION}/Microsoft.NETCore.App.Crossgen2.freebsd-x64.${VERSION}.nupkg -o /var/tmp/nuget/Microsoft.NETCore.App.Crossgen2.freebsd-x64.${VERSION}.nupkg
/var/tmp/dn/dotnet nuget add source /var/tmp/nuget/
cp -R `pwd` /var/tmp/build
cd /var/tmp/build
echo Restore
/var/tmp/dn/dotnet restore --runtime=freebsd-x64 Duplicati.sln
echo Build
/var/tmp/dn/dotnet build Duplicati.sln
echo Publish
/var/tmp/dn/dotnet publish -c Release --runtime=freebsd-x64 -o publish Duplicati.sln
cp -R ./publish ${BUILD_DIR}/publish
- name: Save Artifacts
uses: actions/upload-artifact@v2
with:
name: duplicati-freebsd-x64
path: publish
tests:
runs-on: macos-12
steps:
- uses: actions/checkout@v2
- name: Download dotnet
# See also https://github.com/sec/dotnet-core-freebsd-source-build
# See also https://github.com/Thefrank/dotnet-freebsd-crossbuild
run: curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/v6.0.401-11/dotnet-sdk-6.0.401-freebsd-x64.tar.gz -o dn.tgz
- name: Run test
id: test
uses: vmactions/freebsd-vm@v0
with:
usesh: true
# sync: sshfs
prepare: pkg install -y curl libinotify libunwind git cmake ninja bash wget icu
run: |
#!/bin/bash
set -x
set -e
pwd
ls -lah
whoami
env
freebsd-version
df -h
dmesg | grep memory
swapinfo
dd if=/dev/zero of=/root/swap1 bs=1m count=20480
chmod 0600 /root/swap1
mdconfig -a -t vnode -f /root/swap1 -u 0
swapon /dev/md0
df -h
swapinfo
export DOTNET_CLI_TELEMETRY_OPTOUT=1
BUILD_DIR=`pwd`
cd /var/tmp
mkdir dn
cd dn
echo Unpacking .NET
tar -xzf ${BUILD_DIR}/dn.tgz
cd ${BUILD_DIR}
mkdir /var/tmp/nuget
export RVERSION=v6.0.401-11
export VERSION=6.0.9
curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/${RVERSION}/Microsoft.AspNetCore.App.Runtime.freebsd-x64.${VERSION}.nupkg -o /var/tmp/nuget/Microsoft.AspNetCore.App.Runtime.freebsd-x64.${VERSION}.nupkg
curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/${RVERSION}/Microsoft.NETCore.App.Host.freebsd-x64.${VERSION}.nupkg -o /var/tmp/nuget/Microsoft.NETCore.App.Host.freebsd-x64.${VERSION}.nupkg
curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/${RVERSION}/Microsoft.NETCore.App.Runtime.freebsd-x64.${VERSION}.nupkg -o /var/tmp/nuget/Microsoft.NETCore.App.Runtime.freebsd-x64.${VERSION}.nupkg
curl -L https://github.com/Thefrank/dotnet-freebsd-crossbuild/releases/download/${RVERSION}/Microsoft.NETCore.App.Crossgen2.freebsd-x64.${VERSION}.nupkg -o /var/tmp/nuget/Microsoft.NETCore.App.Crossgen2.freebsd-x64.${VERSION}.nupkg
/var/tmp/dn/dotnet nuget add source /var/tmp/nuget/
cp -R `pwd` /var/tmp/build
cd /var/tmp/build
echo Restore
/var/tmp/dn/dotnet restore --runtime=freebsd-x64 Duplicati.sln
echo Testing
mkdir -p ${BUILD_DIR}/duplicati_testdata/logs
mkdir -p /var/tmp/duplicati_testdata
ln -s ${BUILD_DIR}/duplicati_testdata/logs /var/tmp/duplicati_testdata/logs
export UNITTEST_BASEFOLDER=/var/tmp/duplicati_testdata
/var/tmp/dn/dotnet test --runtime=freebsd-x64 --verbosity minimal Duplicati.sln
- name: Archive Test Logs
if: always()
uses: actions/upload-artifact@v2
with:
name: test-logs
path: duplicati_testdata/logs/*
+5
View File
@@ -1,4 +1,9 @@
name: Close inactive issues
permissions:
contents: read
issues: write
pull-requests: none
on:
schedule:
- cron: "30 1 * * *"
+29 -1
View File
@@ -1,6 +1,8 @@
name: Tests
permissions:
contents: read
issues: none
pull-requests: none
on: [pull_request, workflow_dispatch]
@@ -29,7 +31,33 @@ jobs:
run: dotnet build --no-restore Duplicati.sln
- name: Run unit tests
run: dotnet test --no-build --verbosity minimal Duplicati.sln
run: dotnet test --no-build --verbosity minimal --filter "Category!=Integration" Duplicati.sln
integration_tests:
name: Integration tests
runs-on: ${{ matrix.os }}
strategy:
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 Duplicati.sln
- name: Build Duplicati
run: dotnet build --no-restore Duplicati.sln
- name: Run integration tests
run: dotnet test --no-build --verbosity minimal --filter "Category=Integration" Duplicati.sln
playwright_tests:
name: Playwright UI tests