Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

This change adds CI coverage that validates vfox search/install behavior for the vfox-java plugin in GitHub Actions. The goal is to provide an end-to-end signal that the plugin integrates correctly with vfox.

  • Workflow: e2e vfox
    • Introduce a dedicated workflow that packages the plugin as release.zip, installs vfox via the official install script, adds the plugin from the zip, and runs search/install checks against the plugin.

Example:

- name: Compress build files
  uses: thedoctor0/zip-release@0.7.6
  with:
    type: "zip"
    directory: "./"
    filename: "release.zip"
    exclusions: "*.git* manifest.json"

- name: Install vfox
  run: |
    for i in {1..10}; do
      curl -sSL https://raw.githubusercontent.com/version-fox/vfox/main/install.sh | bash && break || sleep 5;
    done
    vfox --version

- name: Add plugin
  run: vfox add --source ./release.zip

- name: Search and install
  run: |
    vfox search java
    vfox install java
Original prompt

create a github action to test vfox search or vfox install logic, yes, i mean add a e2e test in github actions


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
Copilot AI changed the title [WIP] create a github action to test vfox search or vfox install logic, yes, i mean add a e2e test in github actions Add e2e GitHub Actions workflow for vfox search/install Jan 18, 2026
Copilot AI requested a review from bytemain January 18, 2026 19:26
@bytemain
Copy link
Member

@copilot 那个 action 不存在啊 ,你参考下 python 的 https://github.com/version-fox/vfox-python/blob/26bac10ae9694c576307d73044e9c88e519f0e53/.github/workflows/vfox-test.yaml#L37
name: vfox-test

on:
workflow_call:
workflow_dispatch:
pull_request:
types: ["opened", "reopened", "synchronize"]
push:
tags: ["v*"]

permissions:
contents: write

jobs:
test-on-linux:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: [3.12.2]
mirror: ["", "https://mirrors.huaweicloud.com/python/"]

steps:
  - name: Checkout
    uses: actions/checkout@v5

  - name: Compress build files
    uses: thedoctor0/zip-release@0.7.6
    with:
      type: "zip"
      directory: "./"
      filename: "release.zip"
      exclusions: "*.git* manifest.json"

  - name: Install vfox
    shell: bash
    run: |
      for i in {1..10}; do
        curl -sSL https://raw.githubusercontent.com/version-fox/vfox/main/install.sh | bash && break || sleep 5;
      done
      vfox --version

  - name: Install plugin
    run: |
      vfox add --source ./release.zip

  - name: Install Python ${{ matrix.python-version }}
    env:
      VFOX_PYTHON_MIRROR: ${{ matrix.mirror }}
    run: |
      eval "$(vfox activate bash)"
      vfox install python@${{ matrix.python-version }}
      vfox use -g python@${{ matrix.python-version }}
      vfox current

  - name: Check python ${{ matrix.python-version }}
    run: |
      eval "$(vfox activate bash)"
      python_version=$(python -c 'import sys;print(sys.version, sys.path)')
      echo $python_version

      if [[ ! $python_version == ${{ matrix.python-version }}* ]]; then
          exit 1
      fi

test-on-windows:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest]
python-version: [3.12.2]
mirror: ["", "https://mirrors.huaweicloud.com/python/"]

steps:
  - name: Checkout
    uses: actions/checkout@v5

  - name: Compress build files
    uses: thedoctor0/zip-release@0.7.6
    with:
      type: "zip"
      directory: "./"
      filename: "release.zip"
      exclusions: "*.git* manifest.json"

  - name: Install vfox
    if: runner.os == 'Windows'
    shell: powershell
    run: |
      iex "& {$(irm get.scoop.sh)} -RunAsAdmin"
      Join-Path (Resolve-Path ~).Path "scoop\shims" >> $Env:GITHUB_PATH
      scoop install vfox
      vfox --version

  - name: Install plugin
    if: runner.os == 'Windows'
    run: |
      Invoke-Expression "$(vfox activate pwsh)"
      vfox add --source ./release.zip

  - name: Install Python ${{ matrix.python-version }}
    if: runner.os == 'Windows'
    env:
      VFOX_PYTHON_MIRROR: ${{ matrix.mirror }}
    run: |
      Invoke-Expression "$(vfox activate pwsh)"
      vfox install python@${{ matrix.python-version }}
      vfox use -g python@${{ matrix.python-version }}
      vfox current

  - name: Check python ${{ matrix.python-version }}
    if: runner.os == 'Windows'
    run: |
      Invoke-Expression "$(vfox activate pwsh)"
      $python_version = $(python -c 'import sys;print(sys.version, sys.path)')
      Write-Output $python_version

      if ($python_version -notlike "${{ matrix.python-version }}*") {
          exit 1
      }

Co-authored-by: bytemain <13938334+bytemain@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 18, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/version-fox/vfox-python/contents/.github/workflows
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)
  • https://api.github.com/repos/version-fox/vfox/releases/latest
    • Triggering command: /home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js (http block)

If you need me to access, download, or install something from one of these locations, you can either:

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