vfox E2E Test workflow (version-fox/vfox)
The vfox E2E Test workflow from version-fox/vfox, explained and optimized by Latchkey.
CI health: C - fair
Point runs-on at Latchkey and get run de-duplication, job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.
What it does
This is the vfox E2E Test workflow from the version-fox/vfox repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.
Below, Latchkey shows a faster, safer version produced by its optimization engine.
The workflow
name: vfox E2E Test
on: [push]
jobs:
test-windows:
name: Test on Windows
runs-on: windows-latest
strategy:
matrix:
go-version: ['1.24']
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Check Go installation
run: go version
- name: Check PowerShell version
shell: pwsh
run: $PSVersionTable.PSVersion
- name: Run E2E Tests (PowerShell)
shell: pwsh
run: |
cd ${{ github.workspace }}
$ErrorActionPreference = "Stop"
# Run the E2E test script
& .\scripts\e2e-test.ps1 -Verbose
env:
VFOX_HOME: ${{ runner.temp }}\.vfox
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-windows-${{ matrix.go-version }}
path: ${{ runner.temp }}\.vfox
test-unix:
name: Test on Unix
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
go-version: ['1.24']
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Check Go installation
run: go version
- name: Run E2E Tests (Bash)
shell: bash
run: |
cd ${{ github.workspace }}
chmod +x ./scripts/e2e-test.sh
./scripts/e2e-test.sh
env:
VFOX_HOME: ${{ runner.temp }}/.vfox
- name: Upload test results
if: always()
uses: actions/upload-artifact@v7
with:
name: test-results-${{ matrix.os }}-${{ matrix.go-version }}
path: ${{ runner.temp }}/.vfox
test-summary:
name: Test Summary
runs-on: ubuntu-latest
needs: [test-windows, test-unix]
if: always()
steps:
- name: Download all artifacts
uses: actions/download-artifact@v8
- name: Print summary
run: |
echo "E2E Tests Summary"
echo "================"
echo "Windows tests: $(ls -d test-results-windows-* 2>/dev/null | wc -l) platform(s)"
echo "Unix tests: $(ls -d test-results-* 2>/dev/null | grep -v windows | wc -l) platform(s)"
echo ""
echo "All test artifacts have been uploaded."
- name: Check test results
if: failure()
run: |
echo "Some tests failed. Please check the artifacts above."
exit 1
The same workflow, on Latchkey
Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.
name: vfox E2E Test on: [push] concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true jobs: test-windows: timeout-minutes: 30 name: Test on Windows runs-on: windows-latest strategy: matrix: go-version: ['1.24'] steps: - name: Checkout code uses: actions/checkout@v6 with: fetch-depth: 0 - name: Setup Go uses: actions/setup-go@v4 with: go-version: ${{ matrix.go-version }} - name: Check Go installation run: go version - name: Check PowerShell version shell: pwsh run: $PSVersionTable.PSVersion - name: Run E2E Tests (PowerShell) shell: pwsh run: | cd ${{ github.workspace }} $ErrorActionPreference = "Stop" # Run the E2E test script & .\scripts\e2e-test.ps1 -Verbose env: VFOX_HOME: ${{ runner.temp }}\.vfox - name: Upload test results if: always() uses: actions/upload-artifact@v7 with: name: test-results-windows-${{ matrix.go-version }} path: ${{ runner.temp }}\.vfox test-unix: timeout-minutes: 30 name: Test on Unix runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest] go-version: ['1.24'] steps: - name: Checkout code uses: actions/checkout@v6 with: fetch-depth: 0 - name: Setup Go uses: actions/setup-go@v4 with: go-version: ${{ matrix.go-version }} - name: Check Go installation run: go version - name: Run E2E Tests (Bash) shell: bash run: | cd ${{ github.workspace }} chmod +x ./scripts/e2e-test.sh ./scripts/e2e-test.sh env: VFOX_HOME: ${{ runner.temp }}/.vfox - name: Upload test results if: always() uses: actions/upload-artifact@v7 with: name: test-results-${{ matrix.os }}-${{ matrix.go-version }} path: ${{ runner.temp }}/.vfox test-summary: timeout-minutes: 30 name: Test Summary runs-on: latchkey-small needs: [test-windows, test-unix] if: always() steps: - name: Download all artifacts uses: actions/download-artifact@v8 - name: Print summary run: | echo "E2E Tests Summary" echo "================" echo "Windows tests: $(ls -d test-results-windows-* 2>/dev/null | wc -l) platform(s)" echo "Unix tests: $(ls -d test-results-* 2>/dev/null | grep -v windows | wc -l) platform(s)" echo "" echo "All test artifacts have been uploaded." - name: Check test results if: failure() run: | echo "Some tests failed. Please check the artifacts above." exit 1
What changed
- Run on Latchkey managed runners with one line (
runs-on), which apply the fixes below automatically and self-heal transient failures. This example useslatchkey-small; pick the runner size that fits the job. - Cancel superseded runs when a branch or PR gets a newer push.
- Add a job timeout so a hung step cannot burn hours of runner time.
What Latchkey heals here
This workflow has steps that commonly fail on transient issues (network, registries, flaky browsers). On Latchkey managed runners they are detected, retried, and self-healed instead of failing your build:
- End-to-end and browser tests
This workflow runs 3 jobs (4 with the matrix expanded) per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.