Skip to content

Commit

Permalink
Merge pull request #107 from ropensci/0.9.0
Browse files Browse the repository at this point in the history
README fix
  • Loading branch information
sigmafelix authored Nov 20, 2024
2 parents 0a90dba + e53dcce commit 42799ee
Show file tree
Hide file tree
Showing 16 changed files with 91 additions and 372 deletions.
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# also derived from https://github.com/we-cli/coverage-badge-action
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
name: test-coverage-local

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

name: test-coverage-local

jobs:
test-coverage:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -43,7 +40,6 @@ jobs:
covr::report(covpack, file = file.path('${{ github.workspace }}', 'chopin-coverage-report.html')); \
covd<-covr::coverage_to_list(covpack)$totalcoverage; \
write.table(covd[length(covd)], file = '${{ github.workspace }}/local_cov.Rout', row.names = F, col.names = F)"
shell: bash
- name: Upload covr report as artifact
uses: actions/upload-artifact@v4
Expand All @@ -65,32 +61,29 @@ jobs:
COV=$(cat ${{ github.workspace }}/local_cov.Rout)
echo "coverage=$COV" >> $GITHUB_OUTPUT
- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages

- name: Create Badges
shell: bash
run: |
npm i -g badgen-cli
export COV=${{ steps.get-values.outputs.coverage }}
COLOR=$(node -p '+process.env.COV >= 95 ? `green` : `orange`')
COLOR=$(node -p '+process.env.COV >= 95 ? "green" : "orange"')
mkdir -p badges
badgen -j coverage -s $COV% -c $COLOR > badges/coverage.svg
- name: Deploy Badges
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update badges [skip ci]"
branch: gh-pages
skip_fetch: true
skip_checkout: true

# Without this, will get Error:
# Can't find 'action.yml', 'action.yaml' or 'Dockerfile' under '/home/runner/work/coverage-badge-action/coverage-badge-action/action.yml'.
# Did you forget to run actions/checkout before running your local action?
- name: Checkout Back
- name: Checkout artifacts branch
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
ref: artifacts
path: artifact-branch # Add a path to avoid conflicts with main checkout

- name: Commit and Push Badge to Artifacts Branch
run: |
cd artifact-branch
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
mkdir -p actions/workflows/test-coverage-local.yaml
cp ../badges/coverage.svg actions/workflows/test-coverage-local.yaml/
git add actions/workflows/test-coverage-local.yaml/coverage.svg
git commit -m "Update coverage badge [skip ci]" || echo "No changes to commit"
git push origin artifacts
if: success()
61 changes: 0 additions & 61 deletions .github/workflows/test-coverage.yaml

This file was deleted.

1 change: 0 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# 0.9
- `mirai` based `par_*` functions for parallelization
- terra::extract mode in `extract_at()` with `terra` argument and auxiliary arguments including exact, weights, touches

# 0.8
- Bumped version from 0.7.8 to 0.8.0: improving package coverage
Expand Down
2 changes: 1 addition & 1 deletion R/chopin-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## usethis namespace: start
#' @importFrom lifecycle deprecated
#' @section Basic functionalities:
#' * Distribute `terra`, `sf`, and `chopin` functions to parallel workers set by `future`
#' * Distribute `terra`, `sf`, and `chopin` functions to parallel workers set by `future` or `mirai`
#' * Set parallelization strategies based on artificial grids, equal-size clusters, hierarchy, and multiple raster files
#' * Convenience functions for raster-vector overlay and weighted summary from vector dataset
#'
Expand Down
Loading

0 comments on commit 42799ee

Please sign in to comment.