Skip to content

Commit

Permalink
save work
Browse files Browse the repository at this point in the history
  • Loading branch information
tbrowder committed Sep 29, 2023
1 parent 55d4bd2 commit da7f015
Show file tree
Hide file tree
Showing 7 changed files with 95 additions and 15 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/windows-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ jobs:
with:
raku-version: ${{ matrix.raku-version }}
- name: Install Dependencies
run: zef --exclude="z" install --debug --/test --test-depends --deps-only .
run: |
choco install rakudostar
zef --exclude="z" install --debug --/test --test-depends --deps-only .
- name: Run Tests
run: raku -I. t/01-load.t
run: zef --debug --/prove --/tap-harness test .
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Revision history for Mi6-Helper

{{$NEXT}}
- Use @ugexe's solution to replace prove6
- Get Windows testing to be more reliable by using Github workflows
test lines like 'zef --exclude="z" install ..." (for Windows only,
not needed for Linux or MacOS).
Expand Down
8 changes: 8 additions & 0 deletions dev/mi6-new-Foo-Bar/0-README
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,11 @@ Foo-Bar/
This library is free software; you can redistribute it and/or modify it under the Artistic License 2.0.
# is changed to better English::
This library is free software; you may redistribute it or modify it under the Artistic License 2.0.

# 2023-09-29

.github/workflows
# 1. The single test.yml file has been split into separate OS files:
linux.yml
macos.yml
windows.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: test
name: Linux

on:
push:
Expand All @@ -14,19 +14,17 @@ jobs:
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Install Dependencies
run: zef install --/test --test-depends --deps-only .
- name: Install App::Prove6
run: zef install --/test App::Prove6
run: |
zef install --/test --deps-only .
zef install --/test App::Prove6
- name: Run Tests
run: prove6 -I. t
run: prove6 -l t
30 changes: 30 additions & 0 deletions dev/mi6-new-Foo-Bar/Foo-Bar/.github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: MacOS

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

jobs:
raku:
strategy:
matrix:
os:
- macos-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Install Dependencies
run: |
zef install --/test --deps-only .
zef install --/test App::Prove6
- name: Run Tests
run: prove6 -l t
33 changes: 33 additions & 0 deletions dev/mi6-new-Foo-Bar/Foo-Bar/.github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Win64

env:
TEST_JOBS: 1

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

jobs:
raku:
strategy:
matrix:
os:
- windows-latest
raku-version:
- '2022.07'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: Raku/setup-raku@v1
with:
raku-version: ${{ matrix.raku-version }}
- name: Install Dependencies
run: |
choco install rakudostar
zef --exclude="z" install --debug --/test --test-depends --deps-only .
- name: Run Tests
run: zef --debug --/prove --/tap-harness test .
18 changes: 13 additions & 5 deletions lib/Mi6/Helper.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ sub mi6-helper-new(:$parent-dir!, :$module-name!, :$provides, :$debug) is export
}
@omodfil.push: $line;
}
# put ramaining content in the README.rakudoc file
# put remaining content in the README.rakudoc file
@idocfil.push($_) for @imodfil;

# treat the README file
Expand All @@ -118,8 +118,8 @@ sub mi6-helper-new(:$parent-dir!, :$module-name!, :$provides, :$debug) is export
}
elsif $line ~~ /^ \h* Copyright/ {
# use copyright symbol
# Copyright © 2021 Tom Browder
# Copyright E<0x00a9> 2021 Tom Browder
# Copyright © 2023 Tom Browder
# Copyright E<0x00a9> 2023 Tom Browder
$line ~~ s/Copyright/;
}
elsif $line ~~ /^ \h* This \h+ library/ {
Expand Down Expand Up @@ -148,18 +148,24 @@ sub mi6-helper-new(:$parent-dir!, :$module-name!, :$provides, :$debug) is export
$fh.say($_) for @omodfil;
$fh.close;

# mod the .github/workflows/test.yml files
# use the .github/workflows/*.yml files as I've updated them

=begin comment
my $testfil = "$modpdir/.github/workflows/test.yml";
my @itestfil = $testfil.IO.lines;
=end comment

my $Lfil = "$modpdir/.github/workflows/linux.yml";
my $Wfil = "$modpdir/.github/workflows/windows.yml";
my $Mfil = "$modpdir/.github/workflows/macos.yml";

=begin comment
my $Lfh = open $Lfil, :w;
my $Wfh = open $Wfil, :w;
my $Mfh = open $Mfil, :w;
=end comment

=begin comment
my ($L, $W, $M);
while @itestfil.elems {
my $line = @itestfil.shift;
Expand Down Expand Up @@ -203,8 +209,10 @@ sub mi6-helper-new(:$parent-dir!, :$module-name!, :$provides, :$debug) is export
$Wfh.close;
$Mfh.close;
unlink $testfil; # don't need the old one
=end comment

# mod the dist.ini file. add ALL optional sections recognized by App::Mi6

# mod the dist.ini file. add ALL optional sections recognized byApp::Mi6
my $distfil = "$modpdir/dist.ini";
my @idistfil = $distfil.IO.lines;
my @odistfil;
Expand Down

0 comments on commit da7f015

Please sign in to comment.