From 815549482d105951bc5d55b7b321a34fda7658d7 Mon Sep 17 00:00:00 2001 From: Stefan Verhoeven Date: Wed, 25 Sep 2024 14:05:33 +0200 Subject: [PATCH] Split CI per lang --- .github/workflows/{ci.yml => openapi.yml} | 33 +---------------------- .github/workflows/python.yml | 28 +++++++++++++++++++ .github/workflows/r.yml | 28 +++++++++++++++++++ 3 files changed, 57 insertions(+), 32 deletions(-) rename .github/workflows/{ci.yml => openapi.yml} (51%) create mode 100644 .github/workflows/python.yml create mode 100644 .github/workflows/r.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/openapi.yml similarity index 51% rename from .github/workflows/ci.yml rename to .github/workflows/openapi.yml index 7a09e00..8f0ebbd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/openapi.yml @@ -1,4 +1,4 @@ -name: Validate OpenAPI +name: Validate OpenAPI.yaml on: push: @@ -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 \ No newline at end of file diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml new file mode 100644 index 0000000..936aed1 --- /dev/null +++ b/.github/workflows/python.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/r.yml b/.github/workflows/r.yml new file mode 100644 index 0000000..f618348 --- /dev/null +++ b/.github/workflows/r.yml @@ -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