Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest GHA workflows #1169

Merged
merged 3 commits into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ on:
types: [published]
workflow_dispatch:

name: pkgdown
name: pkgdown.yaml

permissions: read-all

jobs:
pkgdown:
Expand All @@ -19,8 +21,10 @@ jobs:
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

Expand All @@ -39,7 +43,7 @@ jobs:

- name: Deploy to GitHub pages 🚀
if: github.event_name != 'pull_request'
uses: JamesIves/github-pages-deploy-action@4.1.4
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
clean: false
branch: gh-pages
Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/pr-commands.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ on:
issue_comment:
types: [created]

name: Commands
name: pr-commands.yaml

permissions: read-all

jobs:
document:
Expand All @@ -13,8 +15,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down Expand Up @@ -50,8 +54,10 @@ jobs:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: r-lib/actions/pr-fetch@v2
with:
Expand Down
38 changes: 34 additions & 4 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ on:
pull_request:
branches: [main, master]

name: test-coverage
name: test-coverage.yaml

permissions: read-all

jobs:
test-coverage:
Expand All @@ -15,7 +17,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

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

- name: Install French language package
if: runner.os == 'Linux'
Expand All @@ -27,9 +29,37 @@ jobs:

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

- name: Test coverage
run: covr::codecov(quiet = FALSE)
run: |
cov <- covr::package_coverage(
quiet = FALSE,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
)
covr::to_cobertura(cov)
shell: Rscript {0}

- uses: codecov/codecov-action@v4
with:
fail_ci_if_error: ${{ github.event_name != 'pull_request' && true || false }}
file: ./cobertura.xml
plugin: noop
disable_search: true
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find '${{ runner.temp }}/package' -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Suggests:
knitr,
rmarkdown,
testthat (>= 2.1.0),
vctrs (>= 0.5.0)
vctrs (>= 0.6.5)
Enhances:
chron,
data.table,
Expand Down
120 changes: 72 additions & 48 deletions tests/testthat/_snaps/vctrs.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,105 +3,129 @@
Code
# # no common type when mixing Period/Duration/Interval
vec_ptype2(period(), duration())
Error <vctrs_error_ptype2>
Can't combine `period()` <Period> and `duration()` <Duration>.
Condition
Error:
! Can't combine `period()` <Period> and `duration()` <Duration>.
Code
vec_ptype2(duration(), period())
Error <vctrs_error_ptype2>
Can't combine `duration()` <Duration> and `period()` <Period>.
Condition
Error:
! Can't combine `duration()` <Duration> and `period()` <Period>.
Code
vec_ptype2(period(), interval())
Error <vctrs_error_ptype2>
Can't combine `period()` <Period> and `interval()` <Interval>.
Condition
Error:
! Can't combine `period()` <Period> and `interval()` <Interval>.
Code
vec_ptype2(interval(), period())
Error <vctrs_error_ptype2>
Can't combine `interval()` <Interval> and `period()` <Period>.
Condition
Error:
! Can't combine `interval()` <Interval> and `period()` <Period>.
Code
vec_ptype2(duration(), interval())
Error <vctrs_error_ptype2>
Can't combine `duration()` <Duration> and `interval()` <Interval>.
Condition
Error:
! Can't combine `duration()` <Duration> and `interval()` <Interval>.
Code
vec_ptype2(interval(), duration())
Error <vctrs_error_ptype2>
Can't combine `interval()` <Interval> and `duration()` <Duration>.
Condition
Error:
! Can't combine `interval()` <Interval> and `duration()` <Duration>.
Code
# # can't cast between Period/Duration/Interval
vec_cast(period(), duration())
Error <vctrs_error_cast>
Can't convert `period()` <Period> to <Duration>.
Condition
Error:
! Can't convert `period()` <Period> to <Duration>.
Code
vec_cast(duration(), period())
Error <vctrs_error_cast>
Can't convert `duration()` <Duration> to <Period>.
Condition
Error:
! Can't convert `duration()` <Duration> to <Period>.
Code
vec_cast(period(), interval())
Error <vctrs_error_cast>
Can't convert `period()` <Period> to <Interval>.
Condition
Error:
! Can't convert `period()` <Period> to <Interval>.
Code
vec_cast(interval(), period())
Error <vctrs_error_cast>
Can't convert `interval()` <Interval> to <Period>.
Condition
Error:
! Can't convert `interval()` <Interval> to <Period>.
Code
vec_cast(duration(), interval())
Error <vctrs_error_cast>
Can't convert `duration()` <Duration> to <Interval>.
Condition
Error:
! Can't convert `duration()` <Duration> to <Interval>.
Code
vec_cast(interval(), duration())
Error <vctrs_error_cast>
Can't convert `interval()` <Interval> to <Duration>.
Condition
Error:
! Can't convert `interval()` <Interval> to <Duration>.
Code
# # Period default ptype2 method falls through to `vec_default_ptype2()`
vec_ptype2(period(), 1)
Error <vctrs_error_ptype2>
Can't combine `period()` <Period> and `1` <double>.
Condition
Error:
! Can't combine `period()` <Period> and `1` <double>.
Code
vec_ptype2(1, period())
Error <vctrs_error_ptype2>
Can't combine `1` <double> and `period()` <Period>.
Condition
Error:
! Can't combine `1` <double> and `period()` <Period>.
Code
# # Period default cast method falls through to `vec_default_cast()`
vec_cast(period(), 1)
Error <vctrs_error_cast>
Can't convert `period()` <Period> to <double>.
Condition
Error:
! Can't convert `period()` <Period> to <double>.
Code
vec_cast(1, period())
Error <vctrs_error_cast>
Can't convert `1` <double> to <Period>.
Condition
Error:
! Can't convert `1` <double> to <Period>.
Code
# # Duration default ptype2 method falls through to `vec_default_ptype2()`
vec_ptype2(duration(), 1)
Error <vctrs_error_ptype2>
Can't combine `duration()` <Duration> and `1` <double>.
Condition
Error:
! Can't combine `duration()` <Duration> and `1` <double>.
Code
vec_ptype2(1, duration())
Error <vctrs_error_ptype2>
Can't combine `1` <double> and `duration()` <Duration>.
Condition
Error:
! Can't combine `1` <double> and `duration()` <Duration>.
Code
# # Duration default cast method falls through to `vec_default_cast()`
vec_cast(duration(), 1)
Error <vctrs_error_cast>
Can't convert `duration()` <Duration> to <double>.
Condition
Error:
! Can't convert `duration()` <Duration> to <double>.
Code
vec_cast(1, duration())
Error <vctrs_error_cast>
Can't convert `1` <double> to <Duration>.
Condition
Error:
! Can't convert `1` <double> to <Duration>.
Code
# # Interval default ptype2 method falls through to `vec_default_ptype2()`
vec_ptype2(interval(), 1)
Error <vctrs_error_ptype2>
Can't combine `interval()` <Interval> and `1` <double>.
Condition
Error:
! Can't combine `interval()` <Interval> and `1` <double>.
Code
vec_ptype2(1, interval())
Error <vctrs_error_ptype2>
Can't combine `1` <double> and `interval()` <Interval>.
Condition
Error:
! Can't combine `1` <double> and `interval()` <Interval>.
Code
# # Interval default cast method falls through to `vec_default_cast()`
vec_cast(interval(), 1)
Error <vctrs_error_cast>
Can't convert `interval()` <Interval> to <double>.
Condition
Error:
! Can't convert `interval()` <Interval> to <double>.
Code
vec_cast(1, interval())
Error <vctrs_error_cast>
Can't convert `1` <double> to <Interval>.
Condition
Error:
! Can't convert `1` <double> to <Interval>.

Loading