Skip to content

Commit

Permalink
CI test for 0.4.12 release
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Aug 31, 2024
1 parent da295e2 commit 2d0d5e6
Show file tree
Hide file tree
Showing 10 changed files with 108 additions and 25 deletions.
1 change: 1 addition & 0 deletions .github/workflows/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lizmat:
28 changes: 28 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Linux

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
raku:
strategy:
matrix:
os:
- ubuntu-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Install Dependencies
run: zef install --/test --test-depends --deps-only .
- name: Run Special Tests
run: raku run-tests -i
12 changes: 5 additions & 7 deletions .github/workflows/test.yml → .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: MacOS

on:
push:
Expand All @@ -13,20 +13,18 @@ jobs:
strategy:
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest
- macos-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- if: matrix.os == 'macOS-latest'
- name: Install OpenSSL
run: brew install openssl
- name: Install Dependencies
run: zef -v install --/test --test-depends --deps-only .
- name: Run Tests
run: raku run-tests
run: raku run-tests -i
28 changes: 28 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Windows

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
raku:
strategy:
matrix:
os:
- windows-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Install Dependencies
run: zef install --/test --test-depends --deps-only .
- name: Run Special Tests
run: raku run-tests -i
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Revision history for IRC::Client

{{$NEXT}}
- Bump version of IO::Socket::Async::SSL, and make it accept any
future versions as well, to prevent clashes with e.g. Whateverable
- Add separate badges for each OS
- Update copyright year

4.0.11 2023-11-07T14:12:36+01:00
- Don't cue ping tests for the same second. This could happen when
Expand Down
2 changes: 1 addition & 1 deletion META6.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"build-depends": [
],
"depends": [
"IO::Socket::Async::SSL:ver<0.7.14>"
"IO::Socket::Async::SSL:ver<0.8.0+>"
],
"description": "Extendable Internet Relay Chat client",
"license": "Artistic-2.0",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Actions Status](https://github.com/lizmat/IRC-Client/workflows/test/badge.svg)](https://github.com/lizmat/IRC-Client/actions)
[![Actions Status](https://github.com/lizmat/IRC-Client/actions/workflows/linux.yml/badge.svg)](https://github.com/lizmat/IRC-Client/actions) [![Actions Status](https://github.com/lizmat/IRC-Client/actions/workflows/macos.yml/badge.svg)](https://github.com/lizmat/IRC-Client/actions) [![Actions Status](https://github.com/lizmat/IRC-Client/actions/workflows/windows.yml/badge.svg)](https://github.com/lizmat/IRC-Client/actions)

NAME
====
Expand Down Expand Up @@ -58,7 +58,7 @@ COPYRIGHT AND LICENSE

Copyright 2015-2021 Zoffix Znet

Copyright 2021-2023 Elizabeth Mattijsen
Copyright 2021-2024 Elizabeth Mattijsen

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!

Expand Down
4 changes: 3 additions & 1 deletion dist.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ filename = lib/IRC/Client.rakumod
; match = ^ 'xt/'

[Badges]
provider = github-actions/test
provider = github-actions/linux.yml
provider = github-actions/macos.yml
provider = github-actions/windows.yml

[UploadToZef]
4 changes: 2 additions & 2 deletions lib/IRC/Client.rakumod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use IO::Socket::Async::SSL:ver<0.7.14>;
use IO::Socket::Async::SSL:ver<0.8.0+>;
unit class IRC::Client;

my &colored; # debug message coloring logic
Expand Down Expand Up @@ -866,7 +866,7 @@ Pull Requests are welcome.
Copyright 2015-2021 Zoffix Znet
Copyright 2021-2023 Elizabeth Mattijsen
Copyright 2021-2024 Elizabeth Mattijsen
If you like this module, or what I’m doing more generally, committing to a
L<small sponsorship|https://github.com/sponsors/lizmat/> would mean a great
Expand Down
46 changes: 34 additions & 12 deletions run-tests
Original file line number Diff line number Diff line change
@@ -1,39 +1,61 @@
unit sub MAIN(:a($author), :i($install));

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

say "Testing {"dist.ini".IO.lines.head.substr(7)}";
say "Testing {
"dist.ini".IO.lines.head.substr(7)
}{
" including author tests" if $author
}";

my @failed;
my $done = 0;
for "t".IO.dir(:test(*.ends-with: '.t' | '.rakutest')).map(*.Str).sort {
say "=== $_";
my $proc = run "raku", "--ll-exception", "-Ilib", $_, :out, :err, :merge;

sub process($proc, $filename) {
if $proc {
$proc.out.slurp;
}
else {
@failed.push($_);
@failed.push($filename);
if $proc.out.slurp -> $stdout {
my @lines = $stdout.lines;
with @lines.first(*.starts-with(" from gen/moar/stage2"),:k) -> $index {
with @lines.first(
*.starts-with(" from gen/moar/stage2"),:k)
-> $index {
say @lines[^$index].join("\n");
}
else {
say $stdout;
}
}
elsif $proc.err -> $stderr {
say .slurp with $stderr;
}
else {
say "No output received, exit-code $proc.exitcode() ($proc.signal())";
say "No output received, exit-code $proc.exitcode() ($proc.signal()):\n$proc.os-error()";
}
}
$done++;
}

sub install() {
my $zef := $*DISTRO.is-win ?? 'zef.bat' !! 'zef';
my $proc := run $zef, "install", ".", "--verbose", "--/test", :out,:err,:merge;
process($proc, "*installation*");
}

sub test-dir($dir) {
for $dir.IO.dir(:test(*.ends-with: '.t' | '.rakutest')).map(*.Str).sort {
say "=== $_";
my $proc := run "raku", "--ll-exception", "-I.", $_, :out,:err,:merge;
process($proc, $_);
$done++;
}
}

test-dir("t");
test-dir("xt") if $author && "xt".IO.e;
install if $install;

if @failed {
say "FAILED: {+@failed} of $done:";
say "\nFAILED: {+@failed} of $done:";
say " $_" for @failed;
exit +@failed;
}
Expand Down

0 comments on commit 2d0d5e6

Please sign in to comment.