Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split up linting from running tests #359

Merged
merged 1 commit into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 2 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,18 @@
# This workflow will do a clean install of the dependencies and run tests across different versions
#
# Requires scripts:
# - bin/run_lints.R
# - bin/run_tests.R

name: Exercise tests

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

jobs:
precheck:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938

- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.3.1
use-public-rspm: true

- name: Install project dependencies
run: |
install.packages(c("testthat", "jsonlite", "lintr"))
shell: Rscript {0}

- name: Run exercism/r ci pre-check (checks config, lint code) for all exercises
run: |
source("bin/run_lints.R")
shell: Rscript {0}

ci:
runs-on: ubuntu-22.04

Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will do a clean install of the dependencies and run the linter
#
# Requires scripts:
# - bin/run_lints.R

name: Lint exercises

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938

- uses: r-lib/actions/setup-r@v2
with:
r-version: 4.3.1
use-public-rspm: true

- name: Install project dependencies
run: |
install.packages(c("testthat", "jsonlite", "lintr"))
shell: Rscript {0}

- name: Run exercism/r ci pre-check (checks config, lint code) for all exercises
run: |
source("bin/run_lints.R")
shell: Rscript {0}