Skip to content

Commit

Permalink
Release 1.4.2
Browse files Browse the repository at this point in the history
- fix rare issue in covered lines collector
- add code coverage badges
  • Loading branch information
atroxaper committed Oct 21, 2021
2 parents dbdaee3 + ee98379 commit c0ac3a8
Show file tree
Hide file tree
Showing 11 changed files with 160 additions and 21 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/macos-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: MacOS Dev

on:
push:
branches: [ dev ]
pull_request:
branches: [ master ]

workflow_dispatch:

jobs:
raku:
strategy:
matrix:
os:
- macOS-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- 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
- name: Run Tests
run: prove6 t xt
25 changes: 19 additions & 6 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: MacOS

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]

workflow_dispatch:
Expand All @@ -26,7 +24,22 @@ jobs:
run: zef install --/test --test-depends --deps-only .
- name: Install App::Prove6
run: zef install --/test App::Prove6
- name: Run Tests
run: prove6 t
- name: Run XT Tests
run: prove6 xt
- name: Run RaCoCo
run: raku -Ilib bin/racoco --exec='prove6 t xt'
- name: Discover Code Coverage
run: |
coverage=`head -1 .racoco/report.txt | sed 's/\..*//'`
echo $coverage
echo "COVERAGE=$coverage%" >> $GITHUB_ENV
- name: Create Code Coverage Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_COCO_TOCKEN }}
gistID: 3113bf626af5b82ec0917574e638fcf5
filename: racoco-macos-coco.json
namedLogo: Apple
logoColor: 969da4
label: Coverage
labelColor: 343a41
message: ${{ env.COVERAGE }}
color: 5cb45a
30 changes: 30 additions & 0 deletions .github/workflows/ubuntu-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Ubuntu Dev

on:
push:
branches: [ dev ]
pull_request:
branches: [ master ]

workflow_dispatch:

jobs:
raku:
strategy:
matrix:
os:
- ubuntu-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- 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
- name: Run Tests
run: prove6 t xt
25 changes: 19 additions & 6 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Ubuntu

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]

workflow_dispatch:
Expand All @@ -26,7 +24,22 @@ jobs:
run: zef install --/test --test-depends --deps-only .
- name: Install App::Prove6
run: zef install --/test App::Prove6
- name: Run Tests
run: prove6 t
- name: Run XT Tests
run: prove6 xt
- name: Run RaCoCo
run: raku -Ilib bin/racoco --exec='prove6 t xt'
- name: Discover Code Coverage
run: |
coverage=`head -1 .racoco/report.txt | sed 's/\..*//'`
echo $coverage
echo "COVERAGE=$coverage%" >> $GITHUB_ENV
- name: Create Code Coverage Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_COCO_TOCKEN }}
gistID: bbe5dc9c78db69d256b11c2ea562a42f
filename: racoco-ubuntu-coco.json
namedLogo: Ubuntu
logoColor: 969da4
label: Coverage
labelColor: 343a41
message: ${{ env.COVERAGE }}
color: 5cb45a
30 changes: 30 additions & 0 deletions .github/workflows/windows-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Windows Dev

on:
push:
branches: [ dev ]
pull_request:
branches: [ master ]

workflow_dispatch:

jobs:
raku:
strategy:
matrix:
os:
- windows-latest
raku-version:
- 'latest'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- 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
- name: Run Tests
run: prove6 t xt
26 changes: 20 additions & 6 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ name: Windows

on:
push:
branches: [ master, dev ]
pull_request:
branches: [ master ]

workflow_dispatch:
Expand All @@ -26,7 +24,23 @@ jobs:
run: zef install --/test --test-depends --deps-only .
- name: Install App::Prove6
run: zef install --/test App::Prove6
- name: Run Tests
run: prove6 t
- name: Run XT Tests
run: prove6 xt
- name: Run RaCoCo
run: raku -Ilib bin/racoco --exec='prove6 t xt'
- name: Discover Code Coverage
run: |
coverage=`head -1 .racoco/report.txt | sed 's/\..*//'`
echo $coverage
echo "COVERAGE=$coverage%" >> $GITHUB_ENV
shell: bash
- name: Create Code Coverage Badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_COCO_TOCKEN }}
gistID: ab8fd9f770291f542eec3245a756e7c8
filename: racoco-windows-coco.json
namedLogo: Windows
logoColor: 969da4
label: Coverage
labelColor: 343a41
message: ${{ env.COVERAGE }}
color: 5cb45a
4 changes: 4 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Version history:

1.4.2 2021-10-22 'Bugfix release'
- fix rare issue in covered lines collector
- add code coverage badges

1.4.1 2021-10-21 'Second public release'
- add --fix-compunit flag
- fix tests for all three platforms
Expand Down
2 changes: 1 addition & 1 deletion META6.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "App::RaCoCo",
"description": "Raku Code Coverage tool.",
"version": "1.4.1",
"version": "1.4.2",
"perl": "6.*",
"authors": [
"Mikhail Khorkov"
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
[![Ubuntu](https://github.com/atroxaper/raku-RaCoCo/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/atroxaper/raku-RaCoCo/actions/workflows/ubuntu.yml)
[![MacOS](https://github.com/atroxaper/raku-RaCoCo/actions/workflows/macos.yml/badge.svg)](https://github.com/atroxaper/raku-RaCoCo/actions/workflows/macos.yml)
[![Windows](https://github.com/atroxaper/raku-RaCoCo/actions/workflows/windows.yml/badge.svg)](https://github.com/atroxaper/raku-RaCoCo/actions/workflows/windows.yml)
[![Windows](https://github.com/atroxaper/raku-RaCoCo/actions/workflows/windows.yml/badge.svg)](https://github.com/atroxaper/raku-RaCoCo/actions/workflows/windows.yml)<br/>
![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/atroxaper/bbe5dc9c78db69d256b11c2ea562a42f/raw/racoco-ubuntu-coco.json)
![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/atroxaper/3113bf626af5b82ec0917574e638fcf5/raw/racoco-macos-coco.json)
![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/atroxaper/ab8fd9f770291f542eec3245a756e7c8/raw/racoco-windows-coco.json)

# NAME

`App::RaCoCo` - Raku Code Coverage tool.
Expand Down
1 change: 1 addition & 0 deletions lib/App/Racoco/Cli.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -130,5 +130,6 @@ sub USAGE() is export {
--append do not clean coverage data before run tests and append its result to the previous one
--html produce simple html page to visualize results
--color-blind use more readable colors than green/red pare
--fix-compunit erase <library>/.precomp directory before run tests
END
}
2 changes: 1 addition & 1 deletion lib/App/Racoco/CoveredLinesCollector.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class CoveredLinesCollector is export {
.unique
.map(-> $h { .[0] => .[2] with $h.words})
.classify({ $_.key })
.map({ $_.key => $_.value.map(*.value.Int).Set })
.map({ $_.key => $_.value.map({$_.value.Int or -1}).grep(* ne -1).Set })
.Hash
}
}
Expand Down

0 comments on commit c0ac3a8

Please sign in to comment.