Skip to content

ci/testing

ci/testing #1152

Workflow file for this run

name: flaiR-MacOS
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
jobs:
test-installation:
runs-on: macos-latest
strategy:
matrix:
r-version: ['4.1.3', '4.2.3', '4.3.2']
python-version: ['3.10']
fail-fast: false
steps:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: 'arm64'
- name: Verify Python
run: |
python --version
which python
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.r-version }}
- name: Install R dependencies
run: |
Rscript -e 'install.packages(c("reticulate", "remotes"), repos="https://cran.r-project.org")'
Rscript -e 'reticulate::py_config()'
- name: Install flaiR
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
run: |
Rscript -e '
Sys.setenv(GITHUB_PAT = Sys.getenv("GITHUB_PAT"))
tryCatch({
remotes::install_github("davidycliao/flaiR", force = TRUE)
library(flaiR)
cat("flaiR installed and loaded successfully\n")
}, error = function(e) {
cat("Error during installation or loading:", conditionMessage(e), "\n")
quit(status = 1)
})'
- name: Print environment info
if: always()
run: |
python --version
R --version
Rscript -e 'reticulate::py_config()'