Skip to content

CI template improvements: fetch-depth, RUNNER_TEMP, artifact upload #13

@tsavo-at-pieces

Description

@tsavo-at-pieces

Overview

Three independent improvements to the CI skeleton template that each improve cross-platform correctness and debuggability.

1. Use `fetch-depth: 1` in analyze and test jobs

Current: Only `pre-check` uses shallow clone. `analyze` and `test` do full history clone (default).

Impact: ~50-150 seconds wasted per workflow run (5 full clones for 4-platform matrix + analyze).

Fix: Add `fetch-depth: 1` to checkout in both `analyze` and `test` jobs.

2. Use `$RUNNER_TEMP` instead of `/tmp/` in non-managed analyze

Current: Non-managed analyze uses `/tmp/analysis.txt` which doesn't exist on Windows.

Impact: Latent — non-managed analyze currently only runs on ubuntu. But if someone adds sub-package analysis in a matrix context, it breaks on Windows.

Fix: `$RUNNER_TEMP/analysis.txt` works on all platforms.

3. Add artifact upload on test failure

Current: No diagnostic artifacts uploaded when tests fail. Debugging cross-platform CI failures is blind.

Fix: Add conditional artifact upload:

- name: Upload test artifacts on failure
  if: failure()
  uses: actions/upload-artifact@v4
  with:
    name: test-artifacts-\${{ matrix.os }}
    path: |
      test/integration/fixtures/bin/
      **/test-results/
    retention-days: 7

Acceptance Criteria

  • All checkout steps use `fetch-depth: 1`
  • `/tmp/` replaced with `$RUNNER_TEMP` where applicable
  • Artifact upload step added to test job (multi-platform path)
  • Template updated in all relevant locations

Metadata

Metadata

Labels

P2-mediumMedium priorityarea/templateTemplate engine and skeleton filesenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions