Skip to content

Commit 305468a

Browse files
committed
run docker compose with integration test
1 parent 232bafa commit 305468a

3 files changed

Lines changed: 51 additions & 1 deletion

File tree

.github/workflows/dotnet.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,11 @@ jobs:
2727
run: dotnet clean
2828

2929
- name: Build
30-
run: dotnet build --no-restore
30+
run: dotnet build --no-restore
31+
32+
- name: Run integration tests
33+
run: docker compose -f Monero.Test/docker-compose.yml run tests
34+
35+
- name: Cleanup Docker containers
36+
if: always()
37+
run: docker compose -f Monero.Test/docker-compose.yml down -v

Monero.Test/Dockerfile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:8.0-bookworm-slim AS builder
2+
3+
WORKDIR /src
4+
5+
COPY . .
6+
7+
RUN dotnet restore
8+
9+
RUN dotnet build --no-restore
10+
11+
CMD ["dotnet", "test", "--no-build", "--logger:trx"]

Monero.Test/docker-compose.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
services:
2+
3+
tests:
4+
build:
5+
context: ..
6+
dockerfile: Monero.Test/Dockerfile
7+
depends_on:
8+
- xmr_wallet
9+
10+
monerod:
11+
image: btcpayserver/monero:0.18.4.1
12+
container_name: monerod
13+
command: monerod --fixed-difficulty 1 --log-level=2 --rpc-bind-ip=0.0.0.0 --confirm-external-bind --rpc-bind-port=18081 --block-notify="/bin/sh ./scripts/notifier.sh -k -X GET https://host.docker.internal:14142/monerolikedaemoncallback/block?cryptoCode=xmr&hash=%s" --regtest --no-igd --hide-my-port --offline --non-interactive
14+
volumes:
15+
- xmr_data:/data
16+
ports:
17+
- "18081:18081"
18+
19+
xmr_wallet:
20+
image: btcpayserver/monero:0.18.4.1
21+
container_name: xmr_wallet
22+
command: monero-wallet-rpc --log-level 2 --allow-mismatched-daemon-version --rpc-bind-ip=0.0.0.0 --disable-rpc-login --confirm-external-bind --rpc-bind-port=18082 --non-interactive --trusted-daemon --daemon-address=monerod:18081 --wallet-dir=/wallet --tx-notify="/bin/sh ./scripts/notifier.sh -k -X GET https://host.docker.internal:14142/monerolikedaemoncallback/tx?cryptoCode=xmr&hash=%s"
23+
ports:
24+
- "18082:18082"
25+
volumes:
26+
- xmr_wallet:/wallet
27+
depends_on:
28+
- monerod
29+
30+
volumes:
31+
xmr_data:
32+
xmr_wallet:

0 commit comments

Comments
 (0)