Skip to content

Phase 4: Migrate from Travis CI to GitHub Actions#46

Open
dshkol wants to merge 3 commits into
masterfrom
ci/github-actions
Open

Phase 4: Migrate from Travis CI to GitHub Actions#46
dshkol wants to merge 3 commits into
masterfrom
ci/github-actions

Conversation

@dshkol
Copy link
Copy Markdown
Collaborator

@dshkol dshkol commented Nov 11, 2025

Summary

This PR modernizes the CI/CD pipeline by migrating from deprecated Travis CI to GitHub Actions, providing more comprehensive testing across multiple platforms and R versions.

Problem

Travis CI has been deprecated and is no longer the recommended CI solution for open source projects. The existing .travis.yml configuration:

  • Only tests on Linux (Ubuntu Trusty)
  • Single R version
  • Manual system dependency specification
  • Limited matrix flexibility

Solution

Comprehensive GitHub Actions workflow (.github/workflows/R-CMD-check.yaml) featuring:

Multi-Platform Testing

  • Ubuntu Latest (Linux)
  • macOS Latest (Darwin)
  • Windows Latest

Multi-Version R Testing

  • R release (current CRAN version)
  • R devel (development version)
  • R oldrel-1 (one version back for compatibility)

Enhanced Features

  • Automatic dependency management with r-lib actions
  • System dependency installation (GDAL, PROJ, GEOS, udunits2 on Linux)
  • Code coverage reporting to Codecov (on Linux + R release)
  • Artifact uploads for failed checks
  • Test output capture for debugging
  • Warnings as errors for quality control
  • Public RSPM for faster package installation

Benefits

  1. Broader Coverage: 5 test configurations vs. 1
  2. Modern Infrastructure: GitHub-native, well-maintained
  3. Faster Builds: Parallel execution, better caching
  4. Better Debugging: Artifact uploads, detailed logs
  5. Future-Proof: Active development and community support

Changes

  • Added: .github/workflows/R-CMD-check.yaml - Comprehensive CI workflow
  • Updated: README.md - Replaced Travis badge with GitHub Actions badge
  • Updated: NEWS.md - Documented infrastructure modernization
  • Retained: .travis.yml - Left in place for now (can be removed after merge if desired)

Testing

The workflow will run automatically on this PR, testing:

  • Ubuntu + R release
  • Ubuntu + R devel
  • Ubuntu + R oldrel-1
  • macOS + R release
  • Windows + R release

All spatial dependencies (sp, sf) will be tested across all platforms.

Verification

Once merged, the badge will update to show build status:

[![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)

Series Complete! 🎉

  • ✅ Phase 1: Quick fixes and code quality (#43)
  • ✅ Phase 2: gh_covering optimization - 2-3× speedup (#44)
  • ✅ Phase 3: Duplicate detection - 1.25-1.76× speedup (#45)
  • ✅ Phase 4: CI/CD modernization (this PR)

All phases include comprehensive testing, benchmarking (where applicable), and documentation.

🤖 Generated with Claude Code

dshkol and others added 2 commits November 10, 2025 21:33
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>
Replace expect_equivalent() with expect_equal(ignore_attr = TRUE)
to eliminate warning that causes CI failure with error-on: warning.

This aligns with testthat edition 3 best practices.
@dshkol
Copy link
Copy Markdown
Collaborator Author

dshkol commented Nov 11, 2025

Might be contingent on Phase 1 changes. Should probably consolidate these into a single PR...

Exclude CI configuration and benchmark scripts from R package build
to avoid R CMD check warnings about unknown directories.
@MichaelChirico
Copy link
Copy Markdown
Owner

This one could just be done by usethis::use_github_actions() / use_coverage() I reckon, it looks like Claude has added a few extra bells & whistles:

https://usethis.r-lib.org/reference/github_actions.html
https://usethis.r-lib.org/reference/use_coverage.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants