-
Notifications
You must be signed in to change notification settings - Fork 976
Expand file tree
/
Copy pathTaskfile.yml
More file actions
90 lines (79 loc) · 2.75 KB
/
Taskfile.yml
File metadata and controls
90 lines (79 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
version: '3'
vars:
PYTEST_PAR: 4
tasks:
build:
cmds:
- uv run make cln-grpc/proto/node.proto
- uv run make default -j {{ .PYTEST_PAR }}
test:
dir: '.'
deps:
- build
env:
TEST_LOG_IGNORE_ERRORS: "1"
cmds:
- uv run pytest --force-flaky -vvv -n {{ .PYTEST_PAR }} tests {{ .CLI_ARGS }}
test-liquid:
env:
TEST_NETWORK: "liquid-regtest"
TEST_LOG_IGNORE_ERRORS: "1"
cmds:
- sed -i 's/TEST_NETWORK=regtest/TEST_NETWORK=liquid-regtest/g' config.vars
- uv run make cln-grpc/proto/node.proto
- uv run make default -j {{ .PYTEST_PAR }}
- uv run pytest --color=yes --force-flaky -vvv -n {{ .PYTEST_PAR }} tests {{ .CLI_ARGS }}
clean:
cmds:
- poetry run make distclean
tester-docker-image:
cmds:
- docker build --build-arg DOCKER_USER=$(whoami) --build-arg UID=$(id -u) --build-arg GID=$(id -g) --network=host -t cln-tester - <contrib/docker/Dockerfile.tester
isotest:
dir: '.'
deps:
- tester-docker-image
cmds:
- docker run -ti -v $(pwd):/repo cln-tester bash -c 'task -t /repo/Taskfile.yml in-docker-test'
in-docker-build-deps:
cmds:
- sudo apt-get update -q
- sudo apt-get install -y clang jq libsqlite3-dev libpq-dev systemtap-sdt-dev autoconf libtool zlib1g-dev libsodium-dev gettext git
in-docker-init:
# pre-flight tasks, independent of the source code.
dir: '/'
cmds:
- git config --global --add safe.directory /repo/.git
- mkdir -p /test
- python3 -m venv /test/.venv
- /test/.venv/bin/pip3 install wheel
- /test/.venv/bin/pip3 install 'poetry>=1.8,<2'
in-docker-test:
# Just the counterpart called by `isotest` to actually initialize,
# build and test CLN.
dir: '/test'
deps:
- in-docker-init
- in-docker-build-deps
env:
TEST_LOG_IGNORE_ERRORS: "1"
cmds:
# This way of copying allows us to copy the dirty tree, without
# triggering any of the potentially configured hooks which might
# not be available in the docker image.
- (cd /repo && git archive --format tar $(git stash create)) | tar -xvf -
# Yes, this is not that smart, but the `Makefile` relies on
# `git` being able to tell us about the version.
- cp -R /repo/.git /test
- git submodule update --init --recursive
- python3 -m pip install poetry
- poetry run make distclean
- poetry install --with=dev
- poetry run ./configure --disable-valgrind CC='clang'
- poetry run make -j 4
- poetry run pytest --color=yes -vvv -n {{ .PYTEST_PAR }} tests {{ .CLI_ARGS }}
kill:
cmds:
- killall -v bitcoind || true
- killall -v elementsd || true
- killall -v valgrind.bin || true