Skip to content

[WIP] Fix test workflows for actions#184

Draft
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-test-workflows
Draft

[WIP] Fix test workflows for actions#184
Copilot wants to merge 2 commits intomasterfrom
copilot/fix-test-workflows

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 6, 2026

Fix Test Workflows

Root Cause Analysis

The test workflows in action-tests.yml were failing with "Binary not found" errors because:

  • Tests use uses: awalsh128/cache-apt-pkgs-action@dev-v2.0 which checks out the action into a separate directory
  • The action's setup.sh script expects binaries at ${{github.action_path}}/distribute/${{runner.arch}}/cache_apt_pkgs
  • The binaries are built by the build_binaries job and uploaded as artifacts
  • But those artifacts were never downloaded into the action's checked-out directory
  • Result: setup.sh fails with "Binary not found"

Solution Implemented

Modified action-tests.yml to fix all test jobs:

  • Changed all jobs to use local action reference (uses: ./) instead of remote
  • Added needs: [build_binaries] to all test jobs to ensure binaries are built first
  • Added checkout step to jobs that were missing it
  • Added artifact download step after checkout to retrieve built binaries
  • Added distribute directory setup to organize binaries by architecture (X64, X86, ARM64, ARM)
  • Based branch on dev-v2.0 for proper codebase context
  • Obtained code review - no issues with workflow changes
  • Await final validation

Technical Details

The fix adds these steps before action usage in each test job:

  1. Checkout repository code
  2. Download artifacts with pattern cache-apt-pkgs-*
  3. Setup distribute directory and copy binaries to correct architecture folders
  4. Use local action which now finds binaries in ./distribute/${{runner.arch}}/

Testing

Ready for workflow execution test on dev-v2.0 branch.

Original prompt

This section details on the original issue you should resolve

<issue_title>Fix test workflows</issue_title>
<issue_description>https://github.com/awalsh128/cache-apt-pkgs-action/actions/runs/20735353456/job/59531494123</issue_description>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Add needs: [build_binaries] to all test jobs that use the action
- Replace remote action references with local (uses: ./)
- Add checkout step where missing
- Add artifact download and distribute directory setup before action usage
- This ensures binaries built by build_binaries job are available when tests run

Co-authored-by: awalsh128 <2087466+awalsh128@users.noreply.github.com>
@awalsh128
Copy link
Copy Markdown
Owner

Workflow is failing with /home/runner/work/_temp/bd351cec-2a01-466e-801e-6ed4bdc518b7.sh: line 1: ./scripts/distribute.sh: No such file or directory

@awalsh128
Copy link
Copy Markdown
Owner

Use the dev-v2.0 branch

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.

Fix test workflows

2 participants