From 527fc860f3ea30f0c0316c33b0628299708f99fb Mon Sep 17 00:00:00 2001 From: Kevin Ta <116312994+kta-intel@users.noreply.github.com> Date: Wed, 30 Oct 2024 17:18:36 -0400 Subject: [PATCH] trigger workflows on pull request to main (#4) * fix workflows Signed-off-by: kta-intel * fqdn length fix Signed-off-by: kta-intel * acquire fqdn from env Signed-off-by: kta-intel * pause windows-latest workflow Signed-off-by: kta-intel --------- Signed-off-by: kta-intel --- .github/workflows/lint.yml | 2 +- .github/workflows/pytest_coverage.yml | 2 +- .github/workflows/task_runner_custom_weighted_average.yml | 8 ++++++-- .github/workflows/task_runner_skc_compression.yml | 8 ++++++-- tests/github/test_task_runner.py | 4 ++-- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 9ccba39..fc76557 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -5,7 +5,7 @@ name: Lint with Flake8 on: pull_request: - branches: [ develop ] + branches: [ main ] permissions: contents: read diff --git a/.github/workflows/pytest_coverage.yml b/.github/workflows/pytest_coverage.yml index ce2a7f6..2343ad8 100644 --- a/.github/workflows/pytest_coverage.yml +++ b/.github/workflows/pytest_coverage.yml @@ -5,7 +5,7 @@ name: Pytest and code coverage on: pull_request: - branches: [ develop ] + branches: [ main ] permissions: contents: read diff --git a/.github/workflows/task_runner_custom_weighted_average.yml b/.github/workflows/task_runner_custom_weighted_average.yml index 0deec9d..5eaf979 100644 --- a/.github/workflows/task_runner_custom_weighted_average.yml +++ b/.github/workflows/task_runner_custom_weighted_average.yml @@ -5,16 +5,20 @@ name: Task Runner with Median Aggregation on: pull_request: - branches: [ develop ] + branches: [ main ] permissions: contents: read +env: + # A workaround for long FQDN names provided by GitHub actions. + FQDN: "localhost" + jobs: build: strategy: matrix: - os: ['ubuntu-latest', 'windows-latest'] + os: ['ubuntu-latest'] python-version: ['3.8','3.9','3.10','3.11'] runs-on: ${{ matrix.os }} steps: diff --git a/.github/workflows/task_runner_skc_compression.yml b/.github/workflows/task_runner_skc_compression.yml index 7653aec..08bd8f6 100644 --- a/.github/workflows/task_runner_skc_compression.yml +++ b/.github/workflows/task_runner_skc_compression.yml @@ -5,16 +5,20 @@ name: Task Runner with SKC Compression on: pull_request: - branches: [ develop ] + branches: [ main ] permissions: contents: read +env: + # A workaround for long FQDN names provided by GitHub actions. + FQDN: "localhost" + jobs: build: strategy: matrix: - os: ['ubuntu-latest', 'windows-latest'] + os: ['ubuntu-latest'] python-version: ['3.8','3.9','3.10','3.11'] runs-on: ${{ matrix.os }} steps: diff --git a/tests/github/test_task_runner.py b/tests/github/test_task_runner.py index a69f065..e56a9ea 100644 --- a/tests/github/test_task_runner.py +++ b/tests/github/test_task_runner.py @@ -9,7 +9,7 @@ from subprocess import check_call from concurrent.futures import ProcessPoolExecutor -from openfl.utilities.utils import rmtree +from openfl.utilities.utils import rmtree, getfqdn_env from tests.github.utils import create_collaborator, initialize_and_certify_workspace, certify_aggregator @@ -28,7 +28,7 @@ args = parser.parse_args() workspace = args.workspace archive_name = f'{workspace}.zip' - fqdn = socket.getfqdn() + fqdn = getfqdn_env() rounds_to_train = args.rounds_to_train col1, col2 = args.col1, args.col2 col1_data_path, col2_data_path = args.col1_data_path, args.col2_data_path