Skip to content

Commit 0c4f6d2

Browse files
Merge pull request #8 from everoddandeven/automation-test-integration
Basic automation test integration
2 parents 5c3855c + 9b6eae8 commit 0c4f6d2

4 files changed

Lines changed: 53 additions & 2 deletions

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", "--filter", "TestMoneroUtils", "--no-build", "--logger:trx"]

Monero.Test/TestMoneroUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ public TestMoneroUtils() {
1010
}
1111

1212
// Can get integrated addresses
13-
[Fact]
13+
[Fact(Skip = "MoneroUtils.GetIntegratedAddress(): not implemented")]
1414
public void TestGetIntegratedAddresses()
1515
{
1616
string primaryAddress = "58qRVVjZ4KxMX57TH6yWqGcH5AswvZZS494hWHcHPt6cDkP7V8AqxFhi3RKXZueVRgUnk8niQGHSpY5Bm9DjuWn16GDKXpF";

Monero.Test/docker-compose.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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 --rpc-access-control-origins=* --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=28082 --non-interactive --trusted-daemon --daemon-address=monerod:18081 --wallet-dir=/wallet --rpc-access-control-origins=* --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:
33+

0 commit comments

Comments
 (0)