Skip to content

Commit

Permalink
Split CI per lang
Browse files Browse the repository at this point in the history
  • Loading branch information
sverhoeven committed Sep 25, 2024
1 parent ecef158 commit 8155494
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 32 deletions.
33 changes: 1 addition & 32 deletions .github/workflows/ci.yml → .github/workflows/openapi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Validate OpenAPI
name: Validate OpenAPI.yaml

on:
push:
Expand Down Expand Up @@ -38,34 +38,3 @@ jobs:

- name: Yamllint
run: yamllint openapi.yaml

python:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install ruff
run: pip install ruff
- name: Run ruff
run: ruff check python/remotebmi

r:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup R
uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
working-directory: R/remotebmi
- uses: r-lib/actions/check-r-package@v2
working-directory: R/remotebmi
28 changes: 28 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Python

on:
push:
paths:
- "openapi.yaml"
- "python/remotebmi/**"
pull_request:
paths:
- "openapi.yaml"
- "python/remotebmi/**"

jobs:
python:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install ruff
run: pip install ruff
- name: Run ruff
run: ruff check python/remotebmi
28 changes: 28 additions & 0 deletions .github/workflows/r.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: R

on:
push:
paths:
- "R/remotebmi/**"
pull_request:
paths:
- "R/remotebmi/**"

jobs:
r:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
sparse-checkout: |
R/remotebmi
- name: Move R package to root
run: shopt -s dotglob && mv R/remotebmi/* .
- name: Setup R
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

0 comments on commit 8155494

Please sign in to comment.