From 0b27a38c7aa94f45cba7b680338099665a304a39 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Nov 2025 07:08:27 +0000 Subject: [PATCH 1/4] Initial plan From 2e9dc51604b2f42e48f9700096f04c61b947c2d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Nov 2025 07:11:58 +0000 Subject: [PATCH 2/4] Add GitHub Actions build and test workflow Co-authored-by: igormilovanovic <51771+igormilovanovic@users.noreply.github.com> --- .github/workflows/build.yml | 48 +++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b4efe40 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,48 @@ +name: Build and Test + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + python-version: ["3.10", "3.11", "3.12"] + + 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 -r test-requirements.txt + pip install . + + - name: Lint with pycodestyle + run: | + pycodestyle pyhosts/ --max-line-length=120 + + - name: Test with pytest + run: | + pytest test/ -v --cov=pyhosts --cov-report=xml --cov-report=term + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' + with: + file: ./coverage.xml + flags: unittests + name: codecov-umbrella + fail_ci_if_error: false From ed9862347c3738e47ecb9dc649662c6c3e36a1d7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Nov 2025 07:14:47 +0000 Subject: [PATCH 3/4] Address code review feedback for build workflow Co-authored-by: igormilovanovic <51771+igormilovanovic@users.noreply.github.com> --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b4efe40..dd2ff54 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,6 @@ jobs: - name: Install dependencies run: | python -m pip install --upgrade pip - pip install -r requirements.txt pip install -r test-requirements.txt pip install . @@ -46,3 +45,4 @@ jobs: flags: unittests name: codecov-umbrella fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} # Required for private repos, optional for public repos From 10455a20e0fba73b88a45a1df4a2cb4d316d6944 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 5 Nov 2025 07:15:50 +0000 Subject: [PATCH 4/4] Add explicit permissions to build workflow for security Co-authored-by: igormilovanovic <51771+igormilovanovic@users.noreply.github.com> --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index dd2ff54..7b42808 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,6 +9,8 @@ on: jobs: build: runs-on: ${{ matrix.os }} + permissions: + contents: read strategy: fail-fast: false matrix: