-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hudde
committed
Sep 4, 2023
1 parent
f1961cb
commit bd7bb9a
Showing
1 changed file
with
13 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,13 @@ | ||
name: "Codecov" | ||
inputs: | ||
results: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: r-lib/actions/check-r-package@v2 | ||
with: | ||
# Fails on R 3.6 on Windows, remove when this job is removed? | ||
args: 'c("--no-manual", "--as-cran", "--no-multiarch")' | ||
error-on: ${{ env.RCMDCHECK_ERROR_ON || '"note"' }} | ||
|
||
- name: Run coverage check | ||
if: ${{ matrix.config.covr }} | ||
run: | | ||
if (dir.exists("tests/testthat")) { | ||
covr::codecov() | ||
} else { | ||
message("No tests found, coverage not tested.") | ||
} | ||
shell: Rscript {0} | ||
|
||
- name: Show test output | ||
if: always() | ||
run: | | ||
## -- Show test output -- | ||
echo "::group::Test output" | ||
find check -name '*.Rout*' -exec head -n 1000000 '{}' \; || true | ||
echo "::endgroup::" | ||
shell: bash | ||
|
||
- name: Upload check results | ||
if: failure() | ||
uses: actions/upload-artifact@main | ||
with: | ||
name: ${{ inputs.results }}-results | ||
path: check | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
|
||
name: codecov | ||
|
||
jobs: | ||
name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |