improve plots and CI #13
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
| # Comprehensive code quality checks | |
| # Includes linting, spell checking, and documentation validation | |
| on: | |
| push: | |
| branches: [main, master, develop] | |
| pull_request: | |
| branches: [main, master, develop] | |
| name: code-quality | |
| permissions: read-all | |
| jobs: | |
| quality-checks: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| use-public-rspm: true | |
| - name: Install R packages | |
| run: | | |
| renv::install(c("lintr", "spelling", "devtools")) | |
| shell: Rscript {0} | |
| - name: Lint R Code | |
| run: | | |
| lints <- lintr::lint_package() | |
| if (length(lints) > 0) { | |
| print(lints) | |
| cat("::warning::Found", length(lints), "lint issues\n") | |
| } else { | |
| cat("✅ No lint issues found\n") | |
| } | |
| shell: Rscript {0} | |
| - name: Check Spelling | |
| run: | | |
| spelling_errors <- spelling::spell_check_package() | |
| if (nrow(spelling_errors) > 0) { | |
| print(spelling_errors) | |
| cat("::warning::Found", nrow(spelling_errors), "potential spelling errors\n") | |
| } else { | |
| cat("✅ No spelling errors found\n") | |
| } | |
| shell: Rscript {0} | |
| - name: Quality Summary | |
| run: | | |
| cat("## Code Quality Summary\n", file = "quality_summary.md") | |
| cat("- ✅ Lint checks completed\n", file = "quality_summary.md", append = TRUE) | |
| cat("- ✅ Spell checks completed\n", file = "quality_summary.md", append = TRUE) | |
| cat(readLines("quality_summary.md"), sep = "\n") | |
| shell: Rscript {0} |