Repository navigation
Update README.md #21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Copyright (c) 2026, Keaton Szantho | |
| name: CloudPulse CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| check: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| r-version: ['4.4', '4.5', '4.6'] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up R ${{ matrix.r-version }}s | |
| uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: ${{ matrix.r-version }} | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libssl-dev libcurl4-openssl-dev libxml2-dev libpq-dev \ | |
| libcairo2-dev libxt-dev libharfbuzz-dev libfribidi-dev \ | |
| libgdal-dev libproj-dev libudunits2-dev libsodium-dev \ | |
| libfontconfig1-dev libfreetype6-dev | |
| - name: Install R packages | |
| run: | | |
| chmod +x setup/install_R_packages.sh | |
| sudo Rscript setup/install_R_packages.R | |
| - name: Check Shiny app loads without errors | |
| run: | | |
| Rscript -e " | |
| # Source all modules | |
| source('lib/data/aws.r') | |
| source('lib/data/azure.r') | |
| source('lib/data/GCP.r') | |
| source('lib/data/mock.r') | |
| source('lib/data/forecast.r') | |
| cat('All modules sourced successfully\n') | |
| # Check app can be parsed | |
| shiny::shinyAppFile('lib/FInOpsApp.R') | |
| cat('Shiny app loaded successfully\n') | |
| " | |
| - name: Check R syntax on all files | |
| run: | | |
| Rscript -e " | |
| files <- c( | |
| 'lib/FInOpsApp.R', | |
| 'lib/data/aws.r', | |
| 'lib/data/azure.r', | |
| 'lib/data/GCP.r', | |
| 'lib/data/mock.r', | |
| 'lib/data/forecast.r' | |
| ) | |
| errors <- c() | |
| for (f in files) { | |
| result <- tryCatch( | |
| parse(f), | |
| error = function(e) e | |
| ) | |
| if (inherits(result, 'error')) { | |
| errors <- c(errors, paste(f, ':', result\$message)) | |
| } else { | |
| cat('OK:', f, '\n') | |
| } | |
| } | |
| if (length(errors) > 0) { | |
| cat('SYNTAX ERRORS:\n') | |
| cat(paste(errors, collapse = '\n'), '\n') | |
| quit(status = 1) | |
| } | |
| cat('All files passed syntax check\n') | |
| " |