Skip to content

Commit 9a0a658

Browse files
dshkolclaude
andcommitted
Phase 4: Migrate from Travis CI to GitHub Actions
Replaced deprecated Travis CI with modern GitHub Actions workflow providing more comprehensive CI/CD coverage. New GitHub Actions workflow features: - Multi-OS testing: Ubuntu, macOS, Windows - Multi-R version testing: release, devel, oldrel-1 - Automatic dependency installation with caching - System dependency handling for spatial packages - Code coverage reporting to Codecov - Check results and test output artifacts on failure - Warnings treated as errors for strict quality control Travis CI limitations addressed: - Travis CI is deprecated and no longer recommended - Limited to single OS (Linux trusty) - Manual dependency specification - Less flexible matrix configuration Updated README badge to show GitHub Actions status. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 5b5d42e commit 9a0a658

3 files changed

Lines changed: 96 additions & 1 deletion

File tree

.github/workflows/R-CMD-check.yaml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# GitHub Actions workflow for R CMD check
2+
# Replaces deprecated Travis CI configuration
3+
4+
name: R-CMD-check
5+
6+
on:
7+
push:
8+
branches: [main, master]
9+
pull_request:
10+
branches: [main, master]
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: ubuntu-latest, r: 'release'}
23+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
24+
- {os: ubuntu-latest, r: 'oldrel-1'}
25+
- {os: macos-latest, r: 'release'}
26+
- {os: windows-latest, r: 'release'}
27+
28+
env:
29+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
30+
R_KEEP_PKG_SOURCE: yes
31+
PKG_CFLAGS: "-O3 -Wall -pedantic"
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- uses: r-lib/actions/setup-pandoc@v2
37+
38+
- uses: r-lib/actions/setup-r@v2
39+
with:
40+
r-version: ${{ matrix.config.r }}
41+
http-user-agent: ${{ matrix.config.http-user-agent }}
42+
use-public-rspm: true
43+
44+
- name: Install system dependencies (Linux)
45+
if: runner.os == 'Linux'
46+
run: |
47+
sudo apt-get update
48+
sudo apt-get install -y \
49+
libudunits2-dev \
50+
libproj-dev \
51+
libgeos-dev \
52+
libgdal-dev
53+
54+
- uses: r-lib/actions/setup-r-dependencies@v2
55+
with:
56+
extra-packages: |
57+
any::rcmdcheck
58+
any::covr
59+
needs: check
60+
61+
- uses: r-lib/actions/check-r-package@v2
62+
with:
63+
upload-snapshots: true
64+
error-on: 'warning'
65+
66+
- name: Show testthat output
67+
if: always()
68+
run: |
69+
## --------------------------------------------------------------------
70+
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
71+
shell: bash
72+
73+
- name: Upload check results
74+
if: failure()
75+
uses: actions/upload-artifact@v4
76+
with:
77+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
78+
path: check
79+
80+
- name: Test coverage
81+
if: success() && runner.os == 'Linux' && matrix.config.r == 'release'
82+
run: |
83+
Rscript -e 'covr::codecov(
84+
quiet = FALSE,
85+
clean = FALSE,
86+
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "package")
87+
)'
88+
env:
89+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

NEWS.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# `geohashTools` NEWS
22

3+
## v0.3.4 (Development)
4+
5+
### INFRASTRUCTURE
6+
7+
1. Migrated from deprecated Travis CI to GitHub Actions for continuous integration. New workflow tests across multiple R versions (release, devel, oldrel-1) and operating systems (Ubuntu, macOS, Windows), providing more comprehensive coverage. Badge updated in README.
8+
39
## v0.3.3
410

511
Drop references to deprecated rgdal.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ output: github_document
88

99

1010
![logo](logo.png "geohashTools")
11+
[![R-CMD-check](https://github.com/MichaelChirico/geohashTools/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/MichaelChirico/geohashTools/actions/workflows/R-CMD-check.yaml)
1112
[![codecov](https://codecov.io/gh/MichaelChirico/geohashTools/branch/master/graph/badge.svg)](https://app.codecov.io/gh/MichaelChirico/geohashTools?branch=master)
12-
[![Build Status](https://app.travis-ci.com/MichaelChirico/geohashTools.svg?branch=master)](https://app.travis-ci.com/MichaelChirico/geohashTools)
1313
[![CRAN status](https://www.r-pkg.org/badges/version/geohashTools)](https://cran.r-project.org/package=geohashTools)
1414

1515
This package provides tools for working with [Gustavo](https://github.com/niemeyer) [Niemeyer](https://twitter.com/gniemeyer)'s [geohash](https://en.wikipedia.org/wiki/Geohash) system of nestable, compact global coordinates based on [Z-order curves](https://en.wikipedia.org/wiki/Z-order_curve). The system consists of carving the earth into equally-sized rectangles (when projected into latitude/longitude space) and nesting this process recursively.

0 commit comments

Comments
 (0)