Use pandoc setup #255
This file contains 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
name: Run RE Report Tests | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: '0 0 * * 1' | |
jobs: | |
test-reports: | |
runs-on: windows-latest | |
# Allow only authorized collaborators to trigger GA: | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
# All steps in workflow: | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Setup Pandoc for html conversion | |
uses: r-lib/actions/setup-pandoc@v2 | |
- name: Install ospsuite ecosystem and cran packages | |
run: | | |
Rscript .github/workflows/install_dependencies.R | |
- name: Run Tests through README.Rmd | |
run: | | |
Rscript -e 'rmarkdown::render("README.Rmd", encoding = "UTF-8")' | |
- name: Save test results as zip artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-log | |
path: log.json | |
- name: Commit and push test files | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add README.md || echo "No changes in README" | |
git add ./tests/Reports || echo "No changes in Test Reports" | |
git commit -m "Added/modified test reports and updated README" || echo "No changes to commit" | |
git push origin |