Skip to content

Commit

Permalink
Use coveralls instead of codecov (#21)
Browse files Browse the repository at this point in the history
* Update test-coverage.yaml

* update test snapshot

* use coveralls action to submit

* add xml2 for conversion

* update badge
  • Loading branch information
assignUser committed May 31, 2023
1 parent 60c03af commit f17ff3a
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 85 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
branches: [main]
pull_request:
branches: [main, master]

name: test-coverage

Expand All @@ -15,16 +14,24 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
extra-packages: any::covr, any::xml2

- name: Test coverage
run: covr::codecov()
run: |
cov <- covr::package_coverage()
covr::to_cobertura(cov, "cov.xml")
shell: Rscript {0}

- name: Coveralls GitHub Action
uses: coverallsapp/github-action@v2
with:
format: 'cobertura'
file: 'cov.xml'
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ output:
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/assignUser/octolog/workflows/R-CMD-check/badge.svg)](https://github.com/assignUser/octolog/actions)
[![pkgcheck](https://github.com/assignUser/octolog/actions/workflows/pkgcheck.yaml/badge.svg)](https://github.com/assignUser/octolog/actions/workflows/pkgcheck.yaml)
[![Codecov test coverage](https://codecov.io/gh/assignUser/octolog/branch/main/graph/badge.svg)](https://app.codecov.io/gh/assignUser/octolog?branch=main)
[![Coverage Status](https://coveralls.io/repos/github/assignUser/octolog/badge.svg?branch=main)](https://coveralls.io/github/assignUser/octolog?branch=main)
[![DOI](https://zenodo.org/badge/451156961.svg)](https://zenodo.org/badge/latestdoi/451156961)
<!-- badges: end -->

Expand Down
133 changes: 66 additions & 67 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,66 @@

<!-- README.md is generated from README.Rmd. Please edit that file -->

# octolog

<!-- badges: start -->

[![Project Status: Active – The project has reached a stable, usable
state and is being actively
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/assignUser/octolog/workflows/R-CMD-check/badge.svg)](https://github.com/assignUser/octolog/actions)
[![pkgcheck](https://github.com/assignUser/octolog/actions/workflows/pkgcheck.yaml/badge.svg)](https://github.com/assignUser/octolog/actions/workflows/pkgcheck.yaml)
[![Codecov test
coverage](https://codecov.io/gh/assignUser/octolog/branch/main/graph/badge.svg)](https://app.codecov.io/gh/assignUser/octolog?branch=main)
[![DOI](https://zenodo.org/badge/451156961.svg)](https://zenodo.org/badge/latestdoi/451156961)
<!-- badges: end -->

Octolog provides a complete[^1] API for GitHub [workflow
commands](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions)
that makes it easy to create powerful GitHub Actions that create
readable logs.

Additionally it is possible to signal conditions with octolog from R
that will create annotations when used within GitHub Actions but raise
normal R conditions when used interactively. ![Annotations on files of a
PR](man/figures/error.png)

## Installation

You can install the development version of octolog with either of these
options:

``` r
pak::pak("assignUser/octolog")
devtools::install_github("assignUser/octolog")
```

## What are *GitHub Actions*?

[GitHub Actions](https://github.com/features/actions) is a
powerful,free[^2] [CI](https://devguide.ropensci.org/ci.html) service
integrated into every repository on GitHub. You can use actions created
by other users (e.g. the very popular
[r-lib/actions](https://github.com/r-lib/actions) collection of R
related actions) or create your own customized workflow that fits your
needs.

## Example

The best way to see how {octolog} works, is in an actual
[workflow](https://github.com/assignUser/octolog/actions/workflows/test-octolog.yaml).
For more information please see the
[website](assignUser.github.io/octolog) and the [introductory
vignette](https://jacob.wujciak.de/octolog/articles/octolog.html).

## Code of Conduct

Please note that the octolog project is released with a [Contributor
Code of
Conduct](https://jacob.wujciak.de/octolog/CODE_OF_CONDUCT.html). By
contributing to this project, you agree to abide by its terms.

[^1]: The only exception is
[`save-state`](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#sending-values-to-the-pre-and-post-actions)
which can only be used in JavaScript actions.

[^2]: For public repositories.

<!-- README.md is generated from README.Rmd. Please edit that file -->

# octolog

<!-- badges: start -->

[![Project Status: Active – The project has reached a stable, usable
state and is being actively
developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
[![R-CMD-check](https://github.com/assignUser/octolog/workflows/R-CMD-check/badge.svg)](https://github.com/assignUser/octolog/actions)
[![pkgcheck](https://github.com/assignUser/octolog/actions/workflows/pkgcheck.yaml/badge.svg)](https://github.com/assignUser/octolog/actions/workflows/pkgcheck.yaml)
[![Coverage
Status](https://coveralls.io/repos/github/assignUser/octolog/badge.svg?branch=main)](https://coveralls.io/github/assignUser/octolog?branch=main)
[![DOI](https://zenodo.org/badge/451156961.svg)](https://zenodo.org/badge/latestdoi/451156961)
<!-- badges: end -->

Octolog provides a complete[^1] API for GitHub [workflow
commands](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions)
that makes it easy to create powerful GitHub Actions that create
readable logs.

Additionally it is possible to signal conditions with octolog from R
that will create annotations when used within GitHub Actions but raise
normal R conditions when used interactively. ![Annotations on files of a
PR](man/figures/error.png)

## Installation

You can install the development version of octolog with either of these
options:

``` r
pak::pak("assignUser/octolog")
devtools::install_github("assignUser/octolog")
```

## What are *GitHub Actions*?

[GitHub Actions](https://github.com/features/actions) is a
powerful,free[^2] [CI](https://devguide.ropensci.org/ci.html) service
integrated into every repository on GitHub. You can use actions created
by other users (e.g. the very popular
[r-lib/actions](https://github.com/r-lib/actions) collection of R
related actions) or create your own customized workflow that fits your
needs.

## Example

The best way to see how {octolog} works, is in an actual
[workflow](https://github.com/assignUser/octolog/actions/workflows/test-octolog.yaml).
For more information please see the
[website](assignUser.github.io/octolog) and the [introductory
vignette](https://jacob.wujciak.de/octolog/articles/octolog.html).

## Code of Conduct

Please note that the octolog project is released with a [Contributor
Code of Conduct](https://jacob.wujciak.de/octolog/CODE_OF_CONDUCT.html).
By contributing to this project, you agree to abide by its terms.

[^1]: The only exception is
[`save-state`](https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#sending-values-to-the-pre-and-post-actions)
which can only be used in JavaScript actions.

[^2]: For public repositories.
24 changes: 12 additions & 12 deletions tests/testthat/_snaps/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::Group `name` must be length 1!
Condition
[1m[33mError[39m in [1m[1m`octo_start_group()`:[22m
[1m[33mError[39m in `octo_start_group()`:[22m
! Group `name` must be length 1!

---
Expand Down Expand Up @@ -143,7 +143,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::Group `name` must be length 1!
Condition
[1m[33mError[39m in [1m[1m`octo_start_group()`:[22m
[1m[33mError[39m in `octo_start_group()`:[22m
! Group `name` must be length 1!

---
Expand Down Expand Up @@ -295,7 +295,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::You can only mask one value at a time.
Condition
[1m[33mError[39m in [1m[1m`octo_mask_value()`:[22m
[1m[33mError[39m in `octo_mask_value()`:[22m
! You can only mask one value at a time.

---
Expand All @@ -305,7 +305,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::You can only mask one envvar at a time.
Condition
[1m[33mError[39m in [1m[1m`octo_mask_envvar()`:[22m
[1m[33mError[39m in `octo_mask_envvar()`:[22m
! You can only mask one envvar at a time.

---
Expand All @@ -315,7 +315,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::The envvar `SECRET_VAR` does not exists!
Condition
[1m[33mError[39m in [1m[1m`octo_mask_envvar()`:[22m
[1m[33mError[39m in `octo_mask_envvar()`:[22m
! The envvar `SECRET_VAR` does not exists!

---
Expand Down Expand Up @@ -379,7 +379,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::You can only mask one value at a time.
Condition
[1m[33mError[39m in [1m[1m`octo_mask_value()`:[22m
[1m[33mError[39m in `octo_mask_value()`:[22m
! You can only mask one value at a time.

---
Expand All @@ -389,7 +389,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::You can only mask one envvar at a time.
Condition
[1m[33mError[39m in [1m[1m`octo_mask_envvar()`:[22m
[1m[33mError[39m in `octo_mask_envvar()`:[22m
! You can only mask one envvar at a time.

---
Expand All @@ -399,7 +399,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::The envvar `SECRET_VAR` does not exists!
Condition
[1m[33mError[39m in [1m[1m`octo_mask_envvar()`:[22m
[1m[33mError[39m in `octo_mask_envvar()`:[22m
! The envvar `SECRET_VAR` does not exists!

---
Expand Down Expand Up @@ -461,7 +461,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::The output `name` must be length 1.
Condition
[1m[33mError[39m in [1m[1m`octo_set_output()`:[22m
[1m[33mError[39m in `octo_set_output()`:[22m
! The output `name` must be length 1.

---
Expand All @@ -471,7 +471,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::The output `value` must be length 1.
Condition
[1m[33mError[39m in [1m[1m`octo_set_output()`:[22m
[1m[33mError[39m in `octo_set_output()`:[22m
! The output `value` must be length 1.

---
Expand Down Expand Up @@ -541,7 +541,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::The output `name` must be length 1.
Condition
[1m[33mError[39m in [1m[1m`octo_set_output()`:[22m
[1m[33mError[39m in `octo_set_output()`:[22m
! The output `name` must be length 1.

---
Expand All @@ -551,7 +551,7 @@
Output
::error file=universe.R,line=23,endLine=42,col=3,endCol=27::The output `value` must be length 1.
Condition
[1m[33mError[39m in [1m[1m`octo_set_output()`:[22m
[1m[33mError[39m in `octo_set_output()`:[22m
! The output `value` must be length 1.

---
Expand Down

0 comments on commit f17ff3a

Please sign in to comment.