Build: Try separating docker compose in MAUI build #355
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Test the desktop app' | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.gitignore' | |
- '**/*.gitattributes' | |
pull_request: | |
branches: | |
- master | |
env: | |
DOTNET_NOLOGO: true | |
DOTNET_CLI_TELEMETRY_OPTOUT: true | |
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup code, .NET and Android | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Build | |
run: dotnet build --configuration Release BTCPayApp.Server | |
# Setup infrastructure | |
- name: Start containers | |
run: docker compose -f "submodules/btcpayserver/BTCPayServer.Tests/docker-compose.yml" up -d dev | |
- name: Start BTCPay | |
run: | | |
cd submodules/btcpayserver | |
nohup dotnet run -c Release --project BTCPayServer & | |
while ! curl -s http://localhost:14142/api/v1/health > /dev/null; do | |
echo "Waiting for BTCPay Server to start..." | |
sleep 10 | |
done | |
# Run tests | |
- name: Run fast tests | |
run: dotnet test -v n --logger "console;verbosity=normal" --filter "Fast=Fast" BTCPayApp.Tests | |
- name: Run integration tests | |
run: dotnet test -v n --logger "console;verbosity=normal" --filter "Integration=Integration" BTCPayApp.Tests | |
- name: Run Selenium tests | |
run: dotnet test --filter "Selenium=Selenium" -v n --logger "console;verbosity=normal" BTCPayApp.Tests |