Skip to content

feature/improve-test-job-speeds#135

Merged
chopkinsmade merged 1 commit into
mainfrom
feature/improve-test-job-speeds
Dec 22, 2025
Merged

feature/improve-test-job-speeds#135
chopkinsmade merged 1 commit into
mainfrom
feature/improve-test-job-speeds

Conversation

@chopkinsmade
Copy link
Copy Markdown
Contributor

@chopkinsmade chopkinsmade commented Dec 22, 2025

What

Create a single job that builds the docker image used by test jobs. As jobs run on independant runner machines, it is not possible for the test jobs to directly access the build docker image from the build job. The upload and download artefact steps are used to get around this

Why

Both test jobs build their own image, which takes longer and adds duplicate code

How this has been tested

  • I have tested locally
  • Testing not required

Reviewer Checklist

  • I have reviewed the PR and ensured no secret values are present

@chopkinsmade chopkinsmade force-pushed the feature/improve-test-job-speeds branch from 8f2d098 to 795e207 Compare December 22, 2025 11:10
@chopkinsmade chopkinsmade marked this pull request as ready for review December 22, 2025 11:14
@chopkinsmade chopkinsmade requested a review from a team as a code owner December 22, 2025 11:14
Copy link
Copy Markdown
Contributor

@Mo-DBT Mo-DBT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a note since we had already discussed it, could be moving some jobs to an ad-hoc local action under .github/actions so we don't have to duplicate logic across multiple files. For example in org.common-ci.yml we could do something for Build docker image step or the repeated docker run ... line present in several places.

We could add something like this as a local action similar to the vulnerability workflow :) :

name: "Security Scan"
description: "Run security scanning using the locally built docker image"

inputs:
  image:
    description: "Docker image to run"
    required: true
  mode:
    description: "Command to run inside the container (run_scan or validate_scan)"
    required: true

runs:
  using: "composite"
  steps:
    - name: Run security scan
      shell: bash
      run: |
        docker run \
          --user $(id -u):$(id -g) \
          -e FORCE_HOOK_CHECKS=0 \
          --rm \
          -v .:/src \ #"${{ inputs.path }}":/src \ <--- but we need to add the path input
          -w /src \
          "${{ inputs.image }}" \
          "${{ inputs.mode }}" \
          --github-action \
          /src

@chopkinsmade chopkinsmade merged commit 3f708d8 into main Dec 22, 2025
17 checks passed
@chopkinsmade chopkinsmade deleted the feature/improve-test-job-speeds branch January 26, 2026 11:20
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.

2 participants