Skip to content

Create re-useable Functional Tests workflow#1932

Merged
mjcheetham merged 3 commits intomasterfrom
reuse-fts
Apr 1, 2026
Merged

Create re-useable Functional Tests workflow#1932
mjcheetham merged 3 commits intomasterfrom
reuse-fts

Conversation

@mjcheetham
Copy link
Copy Markdown
Member

@mjcheetham mjcheetham commented Mar 30, 2026

TL;DR

Extract the functional tests job from build.yaml into a reusable functional-tests.yaml workflow (workflow_call), so that other repositories — specifically microsoft/git — can run VFS for Git functional tests against their own Git builds.

Why?

Currently, our CI builds microsoft/git from a release tag and runs functional tests in a single monolithic workflow. The microsoft/git project wants to run VFS for Git functional tests as part of their CI, using their own freshly-built Git rather than a tagged release. By making the FT workflow reusable, microsoft/git can call it with their own Git artifact while we continue to use it exactly as before.

This will make it easier for changes in microsoft/git to be vetted for VFS for Git compatibility before it gets to a release.

What changed?

The installation flow is split into three independent artifacts — Git installer, GVFS installer, and FT executables — so that callers can provide their own Git build while the GVFS installer and FT executables always come from a VFSForGit run.

This PR is best reviewed commit-by-commit:

  1. Separate Git and GVFS installation

    Splits the combined install.bat into separate Git and GVFS installers. Moves the microsoft/git download from the build job to validate (it only needs to run once, not per-configuration).

    Introduces three artifacts:

    • MicrosoftGit
    • GVFS_<config>
    • FunctionalTests_<config>
  2. Extract functional tests into reusable workflow
    Lift-and-shift of the inline functional_test and ft_results jobs into functional-tests.yaml as a workflow_call workflow. No parameterisation — artifact names and download sources are hardcoded to match existing same-repo behaviour.

  3. Parameterise functional tests workflow for cross-repo use
    Adds inputs (vfs_run_id, git_repository, git_run_id, git_artifact_name, output_prefix, skip) and secrets (vfs_token, git_token) to support cross-repo callers. Adds ARTIFACT_PREFIX and FT_MATRIX_NAME env vars to simplify artifact naming. Adds continue-on-error to diagnostic steps.

See the corresponding PR in microsoft/git that makes use of this reusable workflow: microsoft/git#874

Copy link
Copy Markdown
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

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

Nice!

@mjcheetham mjcheetham marked this pull request as ready for review March 31, 2026 14:10
@mjcheetham mjcheetham requested a review from tyrielv March 31, 2026 15:27
Split the combined install.bat into separate Git and GVFS installers to
allow callers to provide their own Git build independently.

- Move microsoft/git download from build to validate job (runs once)
- Generate a Git-only install.bat inline for the MicrosoftGit artifact
- Simplify GVFS install.bat to only install SetupGVFS (no Git)
- Rename installer artifact from Installers to GVFS
- Download Git (git\), GVFS (gvfs\), and FTs (ft\) separately
- Upload logs from both git\logs and gvfs\logs
Lift-and-shift the functional_test and ft_results jobs from build.yaml
into a new functional-tests.yaml reusable workflow (workflow_call).

build.yaml now calls the reusable workflow, passing only the skip input.
No parameterisation yet - artifact names and download sources are
hardcoded to match the current same-repo behaviour.
Add inputs to allow microsoft/git (or other callers) to provide their
own Git build and download VFSForGit artifacts cross-repo:

- vfs_run_id: paired run ID for GVFS installer + FT executables
- git_repository/git_run_id/git_artifact_name: Git installer source
- output_prefix: namespace uploaded artifacts (e.g. 'VFSForGit')
- vfs_token/git_token: secrets for cross-repo artifact downloads

Add env vars ARTIFACT_PREFIX and FT_MATRIX_NAME to simplify artifact
naming expressions. Add continue-on-error to diagnostic steps.

Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>
@mjcheetham mjcheetham merged commit f3ab63d into master Apr 1, 2026
92 of 93 checks passed
@dscho dscho deleted the reuse-fts branch April 1, 2026 14:04
mjcheetham added a commit to microsoft/git that referenced this pull request Apr 2, 2026
## TL;DR

Add a new `vfs-functional-tests.yml` workflow that builds Git from this
repository and runs the VFS for Git functional tests against it, using
VFSForGit's reusable workflow.

## Why?

VFS for Git functional tests currently only run in the VFSForGit
repository, against a tagged microsoft/git release. This means
VFS-related regressions in Git are only caught *after* a release is
tagged. By running the FTs here on every push and PR to `vfs-*`
branches, we can catch regressions before they ship.

This is the counterpart to
microsoft/VFSForGit#1932, which extracted the
functional tests into a reusable `workflow_call` workflow.

## How it works

1. **Build Git** — checks out this repo, builds with the Git for Windows
SDK, and packages the result into a `MicrosoftGit` artifact with an
`install.bat` that deploys via robocopy to `C:\Program Files\Git`. Both
ARM64 and x64 are built and combined into a single artifact for the FTs
to install and use.

2. **Find VFSForGit build** — locates the latest successful VFSForGit CI
run on `master` to get the GVFS installer and FT executables. If the
build was a 'skipped' build (because an existing run succeeded with that
tree) then follow the annotation to the real run.

3. **Call reusable workflow** — invokes
`microsoft/VFSForGit/.github/workflows/functional-tests.yaml@master`,
which handles the full test matrix (2 configs × 2 architectures × 10
slices)
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.

3 participants