Skip to content

Commit

Permalink
Split up linting from running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikSchierboom committed Oct 12, 2024
1 parent 3bc626a commit 9471f66
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 24 deletions.
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}

0 comments on commit 9471f66

Please sign in to comment.