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

README fix #107

Merged
merged 7 commits into from
Nov 20, 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
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
Loading