Skip to content

Commit 0b3d0b4

Browse files
committed
CI test prior to release
1 parent 9ea9fc7 commit 0b3d0b4

File tree

13 files changed

+193
-26
lines changed

13 files changed

+193
-26
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
.precomp/
22
/IRC-Client-*
33
/releases/
4+
*.rakucov

Changes

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
Revision history for IRC::Client
22

33
{{$NEXT}}
4+
- Use modern test file extensions, and move release tests
5+
to "xt" directory, so they'd be run on upload
6+
- Remove test dependencies, as these are only needed for
7+
author testing
8+
- Moved the release tests out of immediate testing, as they
9+
(or the perl backend) have severely bitrotted
10+
- Update copyright year
411

512
4.0.12 2024-08-31T20:30:02+02:00
6-
- Bump version of IO::Socket::Async::SSL, and make it accept any
7-
future versions as well, to prevent clashes with e.g. Whateverable
13+
- Bump version of IO::Socket::Async::SSL, and make it accept
14+
any future versions as well, to prevent clashes with
15+
e.g. Whateverable
816
- Add separate badges for each OS
917
- Add sponsor button
1018
- Update copyright year

META6.json

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,12 @@
1919
"resources": [
2020
],
2121
"source-url": "https://github.com/lizmat/IRC-Client.git",
22-
"support": {
23-
"source": "https://github.com/lizmat/IRC-Client.git"
24-
},
2522
"tags": [
26-
"Net",
27-
"IRC"
23+
"NET",
24+
"IRC",
25+
"CLIENT"
2826
],
2927
"test-depends": [
30-
"Test::When",
31-
"Test::Notice"
3228
],
3329
"version": "4.0.12"
3430
}

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ DOCUMENTATION MAP
4040
AUTHORS
4141
=======
4242

43-
* Zoffix Znet (2015-2018)
43+
* Zoffix Znet
4444

45-
* Elizabeth Mattijsen (2021-) <liz@raku.rocks>
45+
* Elizabeth Mattijsen
4646

4747
Source can be located at: https://github.com/lizmat/IRC-Client . Comments and Pull Requests are welcome.
4848

49+
If you like this module, or what I’m doing more generally, committing to a [small sponsorship](https://github.com/sponsors/lizmat/) would mean a great deal to me!
50+
4951
CONTRIBUTORS
5052
============
5153

@@ -58,9 +60,7 @@ COPYRIGHT AND LICENSE
5860

5961
Copyright 2015-2021 Zoffix Znet
6062

61-
Copyright 2021-2024 Elizabeth Mattijsen
62-
63-
If you like this module, or what I’m doing more generally, committing to a [small sponsorship](https://github.com/sponsors/lizmat/) would mean a great deal to me!
63+
Copyright 2021-2025 Elizabeth Mattijsen
6464

6565
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
6666

dist.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = IRC-Client
22

33
[ReadmeFromPod]
44
; enable = false
5-
filename = lib/IRC/Client.rakumod
5+
filename = doc/IRC-Client.rakudoc
66

77
[PruneFiles]
88
; match = ^ 'xt/'

doc/IRC-Client.rakudoc

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
=begin pod
2+
3+
=head1 NAME
4+
5+
IRC::Client - Extendable Internet Relay Chat client
6+
7+
=head1 SYNOPSIS
8+
9+
=begin code :lang<raku>
10+
11+
use IRC::Client;
12+
use Pastebin;
13+
14+
.run with IRC::Client.new:
15+
:host<irc.libera.chat>
16+
:channels<#rakubot #zofbot>
17+
:debug
18+
:plugins(
19+
class { method irc-to-me ($ where /hello/) { 'Hello to you too!'} }
20+
)
21+
:filters(
22+
-> $text where .chars > 200 {
23+
'The output is too large to show here. See: '
24+
~ Pastebin.new.paste: $text;
25+
}
26+
);
27+
28+
=end code
29+
30+
=head1 DESCRIPTION
31+
32+
The module provides the means to create clients to communicate with
33+
IRC (Internet Relay Chat) servers. Has support for non-blocking responses
34+
and output post-processing.
35+
36+
=head1 DOCUMENTATION MAP
37+
38+
* [Blog Post](https://github.com/Raku/CCR/blob/main/Remaster/Zoffix%20Znet/IRC-Client-Raku-Multi-Server-IRC-or-Awesome-Async-Interfaces-with-Raku.md)
39+
* [Basics Tutorial](https://github.com/lizmat/IRC-Client/blob/main/docs/01-basics.md)
40+
* [Event Reference](https://github.com/lizmat/IRC-Client/blob/main/docs/02-event-reference.md)
41+
* [Method Reference](https://github.com/lizmat/IRC-Client/blob/main/docs/03-method-reference.md)
42+
* [Big-Picture Behaviour](https://github.com/lizmat/IRC-Client/blob/main/docs/04-big-picture-behaviour.md)
43+
* [Examples](https://github.com/lizmat/IRC-Client/blob/main/examples/)
44+
45+
=head1 AUTHORS
46+
47+
=item Zoffix Znet
48+
=item Elizabeth Mattijsen
49+
50+
Source can be located at: https://github.com/lizmat/IRC-Client . Comments and
51+
Pull Requests are welcome.
52+
53+
If you like this module, or what I’m doing more generally, committing to a
54+
L<small sponsorship|https://github.com/sponsors/lizmat/> would mean a great
55+
deal to me!
56+
57+
=head1 CONTRIBUTORS
58+
59+
=item Daniel Green
60+
=item Patrick Spek
61+
62+
=head1 COPYRIGHT AND LICENSE
63+
64+
Copyright 2015-2021 Zoffix Znet
65+
66+
Copyright 2021-2025 Elizabeth Mattijsen
67+
68+
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
69+
70+
The C<META6.json> file of this distribution may be distributed and modified without restrictions or attribution.
71+
72+
=end pod
73+
74+
# vim: expandtab shiftwidth=4

t/release/01-basic.t renamed to release/01-basic.rakutest

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
use lib <lib t/release>;
21
use Test;
3-
use Test::When <release>;
42
use Test::Notice;
53
use IRC::Client;
4+
5+
use lib $*PROGRAM.parent;
66
use Test::IRC::Server;
77

88
my $Wait = (%*ENV<IRC_CLIENT_TEST_WAIT>//1) * 5;
99

1010
notice 'Testing connection to one server and joining two channels';
1111

1212
diag 'Starting IRC Server';
13-
my $s = Test::IRC::Server.new;
13+
my $s = Test::IRC::Server.new(
14+
server => $*PROGRAM.sibling("servers").add("01-basic.pl").absolute
15+
);
1416
END { $s.kill };
1517

1618
loop {

t/release/02-multi-server.t renamed to release/02-multi-server.rakutest

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
1-
use lib <lib t/release>;
21
use Test;
3-
use Test::When <release>;
42
use Test::Notice;
53
use IRC::Client;
4+
5+
use lib $*PROGRAM.parent;
66
use Test::IRC::Server;
77

88
my $Wait = (%*ENV<IRC_CLIENT_TEST_WAIT>//1) * 5;
99

1010
notice 'Testing connection to four servers and joining two channels in each';
1111

12+
my $server := $*PROGRAM.sibling("servers").add("01-basic.pl").absolute;
13+
1214
diag 'Starting IRC Servers';
13-
my $s1 = Test::IRC::Server.new: :port<5020>;
14-
my $s2 = Test::IRC::Server.new: :port<5021>;
15-
my $s3 = Test::IRC::Server.new: :port<5022>;
16-
my $s4 = Test::IRC::Server.new: :port<5023>;
15+
my $s1 = Test::IRC::Server.new: :$server, :port<5020>;
16+
my $s2 = Test::IRC::Server.new: :$server, :port<5021>;
17+
my $s3 = Test::IRC::Server.new: :$server, :port<5022>;
18+
my $s4 = Test::IRC::Server.new: :$server, :port<5023>;
1719
END { $s1.kill; $s2.kill; $s3.kill; $s4.kill; };
1820

1921
loop {
File renamed without changes.
File renamed without changes.

run-tests

Lines changed: 71 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,66 @@
1-
unit sub MAIN(:a($author), :i($install));
1+
unit sub MAIN(
2+
:a($author),
3+
:i($install),
4+
:$rmd,
5+
:$disable-spesh,
6+
:$disable-spesh-inline,
7+
:$disable-JIT,
8+
:$enable-spesh-nodelay,
9+
:$enable-spesh-blocking,
10+
:$enable-spesh-log,
11+
);
212

313
say run(<raku --version>, :out).out.slurp.chomp;
414
say "Running on $*DISTRO.gist().\n";
515

16+
if $rmd {
17+
%*ENV<RAKUDO_MODULE_DEBUG> := 1;
18+
say "RAKUDO_MODULE_DEBUG=1";
19+
}
20+
21+
if $disable-spesh {
22+
%*ENV<MVM_SPESH_DISABLE> := 1;
23+
say "MVM_SPESH_DISABLE=1";
24+
}
25+
26+
if $disable-spesh-inline {
27+
%*ENV<MVM_SPESH_INLINE_DISABLE> := 1;
28+
say "MVM_SPESH_INLINE_DISABLE=1";
29+
}
30+
31+
if $disable-JIT {
32+
%*ENV<MVM_JIT_DISABLE> := 1;
33+
say "MVM_JIT_DISABLE=1";
34+
}
35+
36+
if $enable-spesh-nodelay {
37+
%*ENV<MVM_SPESH_NODELAY> := 1;
38+
say "MVM_SPESH_NODELAY=1";
39+
}
40+
41+
if $enable-spesh-blocking {
42+
%*ENV<MVM_SPESH_BLOCKING> := 1;
43+
say "MVM_SPESH_BLOCKING=1";
44+
}
45+
46+
my $spesh-log;
47+
if $enable-spesh-log {
48+
$spesh-log = (
49+
$enable-spesh-log ~~ Bool ?? "spesh-log" !! $enable-spesh-log
50+
).IO;
51+
%*ENV<MVM_SPESH_LOG> := $spesh-log.absolute;
52+
say "MVM_SPESH_LOG=$spesh-log.relative()";
53+
}
54+
55+
say ""
56+
if $rmd
57+
|| $disable-spesh
58+
|| $disable-spesh-inline
59+
|| $disable-JIT
60+
|| $enable-spesh-nodelay
61+
|| $enable-spesh-blocking
62+
|| $enable-spesh-log;
63+
664
say "Testing {
765
"dist.ini".IO.lines.head.substr(7)
866
}{
@@ -15,6 +73,7 @@ my $done = 0;
1573
sub process($proc, $filename) {
1674
if $proc {
1775
$proc.out.slurp;
76+
$spesh-log.unlink if $spesh-log;
1877
}
1978
else {
2079
@failed.push($filename);
@@ -32,6 +91,12 @@ sub process($proc, $filename) {
3291
else {
3392
say "No output received, exit-code $proc.exitcode() ($proc.signal()):\n$proc.os-error()";
3493
}
94+
95+
if $spesh-log {
96+
say "\nSpesh log requested, showing last 20000 lines:";
97+
say $spesh-log.lines(:!chomp).tail(20000).join;
98+
$spesh-log.unlink;
99+
}
35100
}
36101
}
37102

@@ -51,8 +116,12 @@ sub test-dir($dir) {
51116
}
52117

53118
test-dir("t");
119+
test-dir($_) for dir("t", :test({ !.starts-with(".") && "t/$_".IO.d})).map(*.Str).sort;
54120
test-dir("xt") if $author && "xt".IO.e;
55-
install if $install;
121+
if $install {
122+
install;
123+
++$done;
124+
}
56125

57126
if @failed {
58127
say "\nFAILED: {+@failed} of $done:";
File renamed without changes.

xt/coverage.rakutest

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
use Test::Coverage;
2+
3+
plan 2;
4+
5+
todo "needs more tests";
6+
coverage-at-least 75;
7+
8+
todo "needs more tests";
9+
uncovered-at-most 1;
10+
11+
source-with-coverage;
12+
13+
report;
14+
15+
# vim: expandtab shiftwidth=4

0 commit comments

Comments
 (0)