Skip to content

Commit

Permalink
split matrix and add task runner api (#1259)
Browse files Browse the repository at this point in the history
* split matrix and add task runner api

* update taskrunner.yml

* check ruff version

* split matrix and add task runner api

* update taskrunner.yml

* check ruff version

* test

* test

* update

* cleanup
  • Loading branch information
rajithkrishnegowda authored Jan 13, 2025
1 parent dfe9512 commit c35d02c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ jobs:
- name: Install linters
run: |
python -m pip install --upgrade pip
pip install -r linters-requirements.txt
pip install -r linters-requirements.txt
- name: Lint with OpenFL-specific rules
run: bash scripts/lint.sh
18 changes: 4 additions & 14 deletions .github/workflows/taskrunner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,19 @@ env:
jobs:
build:
if: github.event.pull_request.draft == false
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest']
python-version: ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
python-version: "3.10"
- name: Install dependencies ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
python -m pip install --upgrade pip
pip install .
- name: Install dependencies windows
if: matrix.os == 'windows-latest'
- name: Task Runner API
run: |
python -m pip install --upgrade pip
pip install .
- name: Test TaskRunner API
run: |
python -m tests.github.test_hello_federation --template keras_cnn_mnist --fed_workspace aggregator --col1 col1 --col2 col2 --rounds-to-train 3 --save-model output_model
python -m tests.github.test_hello_federation --template torch_cnn_mnist --fed_workspace aggregator --col1 collaborator1 --col2 collaborator2 --rounds-to-train 3 --save-model output_model
5 changes: 4 additions & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ env:

jobs:
pytest-coverage: # from pytest_coverage.yml
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
timeout-minutes: 15

Expand All @@ -21,7 +24,7 @@ jobs:
- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@ env:

jobs:
pytest-coverage: # from pytest_coverage.yml
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
runs-on: windows-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- name: Set up Python 3
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down

0 comments on commit c35d02c

Please sign in to comment.