Skip to content

Add PR CI validation workflow#18

Merged
Brent-A merged 16 commits into
mainfrom
copilot/add-pr-ci-validation
Jan 29, 2026
Merged

Add PR CI validation workflow#18
Brent-A merged 16 commits into
mainfrom
copilot/add-pr-ci-validation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 29, 2026

Plan: Add PR CI validation GitHub Action

  • Explore existing test infrastructure and dependencies
  • Create .github/workflows directory structure
  • Create PR CI workflow YAML file
  • Address code review feedback
  • Address security issues
  • Fix CI failure: Add setup_dependencies.sh step to install ITM library
  • Fix permission denied error: Run script with bash explicitly
  • Add alternative ITM source support
  • Improve ITM download robustness
  • All CI issues resolved - workflow ready for testing
Original prompt

This section details on the original issue you should resolve

<issue_title>Add PR CI valiation</issue_title>
<issue_description>Add github action to verify that a PR passes tests before allowing merge</issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 3 commits January 29, 2026 18:04
Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Copilot AI changed the title [WIP] Add GitHub action for PR test verification Add PR CI validation workflow Jan 29, 2026
Copilot AI requested a review from Brent-A January 29, 2026 18:13
@Brent-A
Copy link
Copy Markdown
Owner

Brent-A commented Jan 29, 2026

@copilot Review the results of the build https://github.com/Brent-A/mcsim/actions/runs/21489526138/job/61909832492?pr=18

The CI doesn't install all of the needed dependencies for the tests

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot Review the results of the build https://github.com/Brent-A/mcsim/actions/runs/21489526138/job/61909832492?pr=18

The CI doesn't install all of the needed dependencies for the tests

Fixed in commit f1aadb3. Added step to run ./scripts/setup_dependencies.sh --skip-rerun --skip-dem which installs the ITM library required for the mcsim-itm tests.

@Brent-A
Copy link
Copy Markdown
Owner

Brent-A commented Jan 29, 2026

@copilot https://github.com/Brent-A/mcsim/actions/runs/21490323806/job/61911122812?pr=18
Still shows an error. There is a permission issue running the script.

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot https://github.com/Brent-A/mcsim/actions/runs/21490323806/job/61911122812?pr=18
Still shows an error. There is a permission issue running the script.

Fixed in commit b635dd0. Changed to bash scripts/setup_dependencies.sh to avoid permission denied error since the script doesn't have execute permissions in the repository.

@Brent-A
Copy link
Copy Markdown
Owner

Brent-A commented Jan 29, 2026

@copilot The tests fail because the official ITM source doesn't have linux/macos binaries.

Let's update the dependency script to allow an optional alternative download source and get binaries from https://github.com/usrflo/itm-linux/releases/tag/v1.5

During the CI we can pass that as the alternate source for now until the official source supports linux/mac with NTIA/itm#24

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot The tests fail because the official ITM source doesn't have linux/macos binaries.

Let's update the dependency script to allow an optional alternative download source and get binaries from ...

Fixed in commit a346b44. Added --itm-source parameter to setup_dependencies.sh and configured CI to use https://github.com/usrflo/itm-linux/releases/tag/v1.5 for Linux binaries until official NTIA/itm adds Linux/macOS support.

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
@Brent-A
Copy link
Copy Markdown
Owner

Brent-A commented Jan 29, 2026

@copilot It failed again to get the binary. Check out https://github.com/usrflo/itm-linux/releases/tag/v1.5.2

It looks like the path to the linux release artifact may have been updated, we should update the script accordingly. We should also have the fetch dependencies step fail if we don't get a required dependency

…andling

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot It failed again to get the binary. Check out https://github.com/usrflo/itm-linux/releases/tag/v1.5.2

It looks like the path to the linux release artifact may have been updated, we should ...

Fixed in commit bca5f8f. Enhanced the script to:

  1. Try multiple filename patterns (linux-x86_64, linux_x86_64, linux, x86_64, and direct .so files)
  2. Fail with exit code 1 if ITM library cannot be downloaded or verified
  3. Verify libitm.so exists after extraction and show debug output if not found

The setup step will now fail early if the required ITM dependency isn't successfully installed.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Brent-A/mcsim/actions/runs/21490849629/jobs
    • Triggering command: /usr/bin/curl curl -s -H Accept: application/vnd.github.v3&#43;json REDACTED (http block)
  • https://api.github.com/repos/usrflo/itm-linux/releases/latest
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI and others added 2 commits January 29, 2026 19:04
Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
@Brent-A
Copy link
Copy Markdown
Owner

Brent-A commented Jan 29, 2026

@copilot Still failing. Can you have the script output the tag for the release it is searching and an index of what was found?

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot Still failing. Can you have the script output the tag for the release it is searching and an index of what was found?

Fixed in commit 9ffb6d7. The script now outputs:

  • The release tag being used
  • A complete list of all available assets in the release

This will help diagnose which assets are available and why the script might not be finding the correct one.

@Brent-A
Copy link
Copy Markdown
Owner

Brent-A commented Jan 29, 2026

@copilot , it looks like it didn't even find a release? https://github.com/Brent-A/mcsim/actions/runs/21491347912/job/61914611360?pr=18

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot , it looks like it didn't even find a release? https://github.com/Brent-A/mcsim/actions/runs/21491347912/job/61914611360?pr=18

Fixed in commit aecf24a. Added comprehensive diagnostics that will now show:

  • The API URL being queried
  • GitHub API error messages if any
  • First 500 characters of API response when errors occur
  • Clear indication if no release tag is found

This will help identify whether it's a rate limit issue, repository access problem, or if the release structure is different than expected.

@Brent-A
Copy link
Copy Markdown
Owner

Brent-A commented Jan 29, 2026

@copilot It looks like it might be an issue parsing the release feed? https://github.com/Brent-A/mcsim/actions/runs/21491546988/job/61915140463?pr=18

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot It looks like it might be an issue parsing the release feed? https://github.com/Brent-A/mcsim/actions/runs/21491546988/job/61915140463?pr=18

Fixed in commit 7ca8c8b. Added a fallback to extract the release tag from the html_url field if tag_name is not found in the expected location in the JSON response. Also enhanced diagnostics to:

  • Show first 1000 chars of response (instead of 500)
  • Search for tag_name field in the full response if not found initially
  • Report where the field was found

This should handle cases where the JSON structure varies or fields appear in different order.

@Brent-A
Copy link
Copy Markdown
Owner

Brent-A commented Jan 29, 2026

@copilot https://github.com/Brent-A/mcsim/actions/runs/21491690394/job/61915713211?pr=18 still has an issue.

Here is an example of what is returned:

{
  "url": "https://api.github.com/repos/usrflo/itm-linux/releases/280642339",
  "assets_url": "https://api.github.com/repos/usrflo/itm-linux/releases/280642339/assets",
  "upload_url": "https://uploads.github.com/repos/usrflo/itm-linux/releases/280642339/assets{?name,label}",
  "html_url": "https://github.com/usrflo/itm-linux/releases/tag/v1.5.2",
  "id": 280642339,
  "author": {
    "login": "usrflo",
    "id": 1812146,
    "node_id": "MDQ6VXNlcjE4MTIxNDY=",
    "avatar_url": "https://avatars.githubusercontent.com/u/1812146?v=4",
    "gravatar_id": "",
    "url": "https://api.github.com/users/usrflo",
    "html_url": "https://github.com/usrflo",
    "followers_url": "https://api.github.com/users/usrflo/followers",
    "following_url": "https://api.github.com/users/usrflo/following{/other_user}",
    "gists_url": "https://api.github.com/users/usrflo/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/usrflo/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/usrflo/subscriptions",
    "organizations_url": "https://api.github.com/users/usrflo/orgs",
    "repos_url": "https://api.github.com/users/usrflo/repos",
    "events_url": "https://api.github.com/users/usrflo/events{/privacy}",
    "received_events_url": "https://api.github.com/users/usrflo/received_events",
    "type": "User",
    "user_view_type": "public",
    "site_admin": false
  },
  "node_id": "RE_kwDORBaT_84QukMj",
  "tag_name": "v1.5.2",
  "target_commitish": "master",
  "name": "Release v1.5.2",
  "draft": false,
  "immutable": false,
  "prerelease": false,
  "created_at": "2026-01-28T10:03:22Z",
  "updated_at": "2026-01-28T10:11:25Z",
  "published_at": "2026-01-28T10:09:03Z",
  "assets": [
    {
      "url": "https://api.github.com/repos/usrflo/itm-linux/releases/assets/347087383",
      "id": 347087383,
      "node_id": "RA_kwDORBaT_84UsCIX",
      "name": "itm-linux-aarch64.tar.gz",

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Jan 29, 2026

@copilot https://github.com/Brent-A/mcsim/actions/runs/21491690394/job/61915713211?pr=18 still has an issue.

Here is an example of what is returned:
...

Fixed in commit 337339f. The issue was that GitHub's API response includes spaces after colons in the JSON (e.g., "tag_name": "v1.5.2"), but the grep patterns were looking for no spaces ("tag_name":"v1.5.2"). Updated all grep patterns to use [[:space:]]* to match optional whitespace, which now correctly extracts:

  • Release tags
  • Asset names
  • Download URLs

The script should now successfully parse the API response and download the ITM library.

Co-authored-by: Brent-A <24597447+Brent-A@users.noreply.github.com>
@Brent-A Brent-A marked this pull request as ready for review January 29, 2026 19:42
@Brent-A Brent-A merged commit 02d0f02 into main Jan 29, 2026
1 check passed
@Brent-A Brent-A deleted the copilot/add-pr-ci-validation branch January 30, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PR CI valiation

2 participants