From 5a08ea9518ec229003df7fa1ce5901e87e8774d4 Mon Sep 17 00:00:00 2001 From: Michael Benowitz Date: Fri, 20 Mar 2026 14:48:46 -0400 Subject: [PATCH] Migrate TravisCI to GitHub Actions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/main.yml | 51 ++++++++++++++++++++++++++++++++++++++ .travis.yml | 21 ---------------- 2 files changed, 51 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/main.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4118bfb --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,51 @@ +name: R Build & Check + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + build: + runs-on: ubuntu-latest + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: 'release' + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: | + any::rcmdcheck + magrittr + stringr + MASS + rmarkdown + needs: check + + - name: Check + uses: r-lib/actions/check-r-package@v2 + with: + error-on: '"error"' + + # Replicating Travis 'after_failure' step + - name: Dump logs on failure + if: failure() + run: | + if [ -f ./travis-tool.sh ]; then + chmod +x ./travis-tool.sh + ./travis-tool.sh dump_logs + else + echo "travis-tool.sh not found, skipping dump_logs" + fi diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index b193f25..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: r -sudo: false -cache: packages - -r_binary_packages: - - magrittr - - stringr - - MASS - - rmarkdown - -after_failure: - - ./travis-tool.sh dump_logs - -env: - - WARNINGS_ARE_ERRORS=1 - -notifications: - email: - on_success: change - on_failure: change -