Skip to content

Commit

Permalink
Fix macOS GHA workflow (#17)
Browse files Browse the repository at this point in the history
* Name GHA steps

* Formatting

* Install miniconda manually on GHA runners
  • Loading branch information
milanmlft authored Apr 3, 2024
1 parent 8464e02 commit bc9edf6
Showing 1 changed file with 52 additions and 43 deletions.
95 changes: 52 additions & 43 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -1,50 +1,59 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:

name: R-CMD-check

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- uses: r-lib/actions/setup-pandoc@55acd27e7b238c53bbe735b7a459c203a3b3d579 # v2

- uses: r-lib/actions/setup-r@55acd27e7b238c53bbe735b7a459c203a3b3d579 # v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@55acd27e7b238c53bbe735b7a459c203a3b3d579 # v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@55acd27e7b238c53bbe735b7a459c203a3b3d579 # v2
with:
upload-snapshots: true
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- { os: macos-latest, r: "release" }
- { os: windows-latest, r: "release" }
- { os: ubuntu-latest, r: "devel", http-user-agent: "release" }
- { os: ubuntu-latest, r: "release" }
- { os: ubuntu-latest, r: "oldrel-1" }

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- name: Checkout repo
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4

- name: Set up pandoc
uses: r-lib/actions/setup-pandoc@55acd27e7b238c53bbe735b7a459c203a3b3d579 # v2

- name: Set up R
uses: r-lib/actions/setup-r@55acd27e7b238c53bbe735b7a459c203a3b3d579 # v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

# Install miniconda manually, to prevent installation errors on GHA runners
- name: Setup Miniconda
uses: conda-incubator/[email protected]

- name: Install R dependencies
uses: r-lib/actions/setup-r-dependencies@55acd27e7b238c53bbe735b7a459c203a3b3d579 # v2
with:
extra-packages: any::rcmdcheck
needs: check

- name: Run R CMD check
uses: r-lib/actions/check-r-package@55acd27e7b238c53bbe735b7a459c203a3b3d579 # v2
with:
upload-snapshots: true

0 comments on commit bc9edf6

Please sign in to comment.