From 3161d2e6c5b9a28e2a002a5b00eef0743c9ee63f Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Tue, 24 Oct 2023 09:01:34 -0700 Subject: [PATCH] lint workflow (#303) --- .github/workflows/lint.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/lint.yaml diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml new file mode 100644 index 0000000..96f074d --- /dev/null +++ b/.github/workflows/lint.yaml @@ -0,0 +1,33 @@ +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: lint + +jobs: + lint: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: | + r-lib/lintr + local::. + needs: lint + + - name: Lint + run: lintr::lint_package() + shell: Rscript {0} + env: + LINTR_ERROR_ON_LINT: true +