name: Check-RPerform

on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

jobs:
  build_rperform:
    name: Build Rperform
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3
      - uses: r-lib/actions/setup-r@v2
      - uses: r-lib/actions/setup-r-dependencies@v2
        with:
          extra-packages: any::rcmdcheck
          needs: check
          
      - uses: r-lib/actions/check-r-package@v2
           
  announce_completion:
    name: Show Success Message
    needs:
      - build_rperform
    runs-on: ubuntu-latest
    
    steps:
      - name: "Test Completion"
        run: echo "All GitHub CI tests have passed"
