From 5939441bfe78ae4d8ee9c1320dd93517302dbbf5 Mon Sep 17 00:00:00 2001 From: Frederik Kratzert Date: Mon, 20 Oct 2025 11:31:33 +0000 Subject: [PATCH 1/2] Split workflows --- .github/workflows/format.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/lint.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/test.yml | 31 +++++++++++++++++++++++++++++++ 3 files changed, 93 insertions(+) create mode 100644 .github/workflows/format.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..e6712d8 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,31 @@ +name: Ruff Format Check + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + format: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.11"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + + - name: Check formatting with ruff + run: | + ruff format --check . diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..924c3d3 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: Ruff Lint + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.11"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install ruff + + - name: Lint with ruff + run: | + ruff check . diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d946206 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,31 @@ +name: Python Tests + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ["3.11", "3.12", "3.13"] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements.txt + + - name: Test with unittest + run: | + python -m unittest discover -s tests From 583fc4eabaebb6993d63cadf910b7f29995fb8cd Mon Sep 17 00:00:00 2001 From: Frederik Kratzert Date: Mon, 20 Oct 2025 11:34:46 +0000 Subject: [PATCH 2/2] Remove old CI file --- .github/workflows/ci.yml | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index ec324c5..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: RivRetrieve CI - -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] - -jobs: - build: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.11", "3.12", "3.13"] - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -r requirements.txt - pip install ruff - - - name: Lint with ruff (includes import sorting) - run: | - ruff check . - - - name: Check formatting with ruff - run: | - ruff format --check . - - - name: Test with unittest - run: | - python -m unittest discover -s tests