Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
8fcb1a1
[#3276] Ran 'git init' and the PHAR build without '/dev/null' redirec…
AlexSkrypnyk Nov 10, 2026
958fdf2
[#3276] Added Windows CI jobs for the installer suite and for buildin…
AlexSkrypnyk Nov 10, 2026
d57ac69
[#3276] Split the 'git init' arguments to satisfy the array line leng…
AlexSkrypnyk Nov 10, 2026
6301e3b
[#3276] Wrote the install report and update registry with LF line end…
AlexSkrypnyk Nov 10, 2026
8880a8a
[#3276] Installed PHP and Composer in the WSL2 distribution for the h…
AlexSkrypnyk Nov 10, 2026
2f733c5
[#3276] Capped the Windows installer test step and uploaded its strea…
AlexSkrypnyk Nov 11, 2026
ffd57ef
[#3276] Normalized relative template paths to '/' so pruning excluded…
AlexSkrypnyk Nov 11, 2026
d36249f
[#3276] Normalized Windows path separators in 'File::toRelative()', '…
AlexSkrypnyk Nov 12, 2026
5a7bc0f
[#3276] Made Git test repos removable on Windows and skipped the test…
AlexSkrypnyk Nov 12, 2026
5b5e4b9
[#3276] Treated '/' as the separator for the profile and webroot valu…
AlexSkrypnyk Nov 12, 2026
af0c731
[#3276] Restored the working directory before the workspace is remove…
AlexSkrypnyk Nov 12, 2026
1e5c213
[#3276] Removed the working directory restore from the installer test…
AlexSkrypnyk Nov 13, 2026
dd58969
[#3276] Updated 'alexskrypnyk/prompty' to 1.3.2 and 'alexskrypnyk/php…
AlexSkrypnyk Nov 14, 2026
6bf64fe
[#3276] Copied the template and the extracted archive with relative s…
AlexSkrypnyk Nov 14, 2026
58f8c8a
[#3276] Skipped the post-copy hash check when the staged copy cannot …
AlexSkrypnyk Nov 14, 2026
c3a5f13
[#3276] Suppressed the 'hash_file()' warning for a staged path behind…
AlexSkrypnyk Nov 14, 2026
eeabcdd
[#3276] Removed the PHAR left by the test suite before the Windows PH…
AlexSkrypnyk Nov 14, 2026
aaae908
[#3276] Removed the 'prompty' VCS repository from the installer so 'a…
AlexSkrypnyk Nov 14, 2026
8c09f2f
[#3276] Replaced the hand-rolled separator conversion with 'File::toF…
AlexSkrypnyk Nov 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions .github/workflows/vortex-test-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,82 @@ jobs:
name: vortex-installer
path: .vortex/installer/build/installer.phar
if-no-files-found: error

vortex-test-installer-windows:
runs-on: windows-latest

timeout-minutes: 60

permissions:
contents: read # Checkout the repository; no GITHUB_TOKEN writes are performed.

env:
GITHUB_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN || github.token }}
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.TEST_GITHUB_TOKEN || github.token }}"}}'

steps:
# The installer downloads the template as an archive, which keeps LF line
# endings and symlinks, so the checkout must match it byte for byte.
- name: Keep line endings on checkout
run: git config --global core.autocrlf false

- name: Keep symlinks on checkout
run: git config --global core.symlinks true

- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false

- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
with:
php-version: '8.4'
coverage: none
# The archiver tests build their zip fixtures with 'ZipArchive'.
extensions: zip

- name: Set default branch name
run: git config --global init.defaultBranch main

- name: Install dependencies
run: composer install
working-directory: .vortex/installer

- name: Create test logs directory
run: New-Item -ItemType Directory -Force -Path .logs
working-directory: .vortex/installer

# The event log is streamed, so it names the running test even when the
# step is stopped by its timeout.
- name: Run tests
timeout-minutes: 30
run: composer test -- --log-events-text .logs/phpunit-events.txt
working-directory: .vortex/installer

- name: Upload test logs
if: always()
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7
with:
name: ${{ github.job }}-test-logs
path: .vortex/installer/.logs
include-hidden-files: true
if-no-files-found: ignore

# The suite leaves a PHAR behind, and Box fails on Windows when it
# replaces an existing one.
- name: Remove the PHAR built by the tests
run: if (Test-Path build/installer.phar) { Remove-Item -Force build/installer.phar }
working-directory: .vortex/installer

- name: Build PHAR
run: composer build
working-directory: .vortex/installer

- name: Check PHAR version
run: php build/installer.phar --version
working-directory: .vortex/installer

- name: Install with PHAR
run: php build/installer.phar --no-interaction --no-cleanup --destination=test
working-directory: .vortex/installer
152 changes: 152 additions & 0 deletions .github/workflows/vortex-test-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# This action is used for Vortex maintenance. It will not be used in the scaffolded project.
name: Vortex - Test on Windows

on:
push:
branches:
- main
- release/**
- project/**
- '*.x'
pull_request:
branches:
- main
- feature/**
- bugfix/**
- release/**
- project/**
- '*.x'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# Installs the template with native Windows PHP, then builds and runs the
# stack with Docker Engine inside a WSL2 distribution.
vortex-test-windows-stack:
runs-on: windows-latest

timeout-minutes: 90

permissions:
contents: read # Checkout the repository; no GITHUB_TOKEN writes are performed.

env:
GITHUB_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN || github.token }}
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.TEST_GITHUB_TOKEN || github.token }}"}}'
PACKAGE_TOKEN: ${{ secrets.TEST_GITHUB_TOKEN || github.token }}
VORTEX_CONTAINER_REGISTRY_USER: ${{ secrets.VORTEX_CONTAINER_REGISTRY_USER }}
VORTEX_CONTAINER_REGISTRY_PASS: ${{ secrets.VORTEX_CONTAINER_REGISTRY_PASS }}
AHOY_CONFIRM_RESPONSE: y
AHOY_CONFIRM_WAIT_SKIP: 1
# Variables passed from Windows into WSL; '/p' converts the path.
WSLENV: PACKAGE_TOKEN:VORTEX_CONTAINER_REGISTRY_USER:VORTEX_CONTAINER_REGISTRY_PASS:AHOY_CONFIRM_RESPONSE:AHOY_CONFIRM_WAIT_SKIP:RUNNER_TEMP/p

steps:
# The installer downloads the template as an archive, which keeps LF line
# endings and symlinks, so the checkout must match it byte for byte.
- name: Keep line endings on checkout
run: git config --global core.autocrlf false

- name: Keep symlinks on checkout
run: git config --global core.symlinks true

- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
with:
persist-credentials: false

- name: Setup PHP
uses: shivammathur/setup-php@eb7c497e18156a6bbabfef1d3a82760b9eda3962 # v2
with:
php-version: '8.4'
coverage: none

- name: Set default branch name
run: git config --global init.defaultBranch main

- name: Install installer dependencies
run: composer install
working-directory: .vortex/installer

- name: Install Vortex from the checkout on Windows
run: php .vortex/installer/installer.php --no-interaction --uri="$env:GITHUB_WORKSPACE" --destination="$env:RUNNER_TEMP\star_wars"

- name: Setup WSL2
uses: Vampire/setup-wsl@4c48163d9f981914dd8caa0fc335fe19cca5bff4 # v7.2.0
with:
distribution: Ubuntu-24.04
wsl-version: '2'
# Ahoy bootstraps the tooling package on the host with PHP and Composer.
additional-packages: curl ca-certificates git unzip docker.io docker-compose-v2 docker-buildx php-cli php-curl php-mbstring php-xml php-zip composer

- name: Start Docker in WSL2
shell: wsl-bash {0}
run: |
service docker start
timeout 60 sh -c 'until docker info >/dev/null 2>&1; do sleep 1; done'
docker version
docker compose version

- name: Install Ahoy in WSL2
shell: wsl-bash {0}
run: |
version=2.4.0
curl -fsSL -o /usr/local/bin/ahoy "https://github.com/ahoy-cli/ahoy/releases/download/v${version}/ahoy-bin-linux-amd64"
chmod +x /usr/local/bin/ahoy
ahoy --version

- name: Login to container registry
if: env.VORTEX_CONTAINER_REGISTRY_USER != ''
shell: wsl-bash {0}
run: echo "${VORTEX_CONTAINER_REGISTRY_PASS}" | docker login --username "${VORTEX_CONTAINER_REGISTRY_USER}" --password-stdin

# Docker runs inside the distribution, so the project lives on its own
# filesystem and bind mounts behave as on a Windows workstation.
- name: Copy the project into WSL2
shell: wsl-bash {0}
run: cp -a "${RUNNER_TEMP}/star_wars" /root/star_wars

- name: Check the project has no CRLF line endings
shell: wsl-bash {0}
run: |
if grep -rlI $'\r' --exclude-dir=.git /root/star_wars; then
echo "Files above contain CRLF line endings."
exit 1
fi

# Stand-ins for the network and SSH agent container that Pygmy provides.
- name: Start local routing stubs
shell: wsl-bash {0}
run: |
docker network create amazeeio-network
docker run --detach --name amazeeio-ssh-agent pygmystack/ssh-agent

Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
- name: Build the stack
shell: wsl-bash {0}
run: |
cd /root/star_wars
ahoy build

- name: Check the site responds
shell: wsl-bash {0}
run: |
cd /root/star_wars
docker compose exec -T cli curl -fsSL --output /dev/null http://nginx:8080

- name: Check Ahoy commands
shell: wsl-bash {0}
run: |
cd /root/star_wars
ahoy info
ahoy drush status
ahoy lint
ahoy test-unit

- name: Show container logs
if: failure()
shell: wsl-bash {0}
run: |
cd /root/star_wars
docker compose logs --tail 200
11 changes: 2 additions & 9 deletions .vortex/installer/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"require": {
"php": ">=8.3",
"alexskrypnyk/file": "^1.4.1",
"alexskrypnyk/prompty": "^1.2.0",
"alexskrypnyk/prompty": "^1.3.2",
"alexskrypnyk/str2name": "^1.7.0",
"composer/composer": "^2.11.1",
"czproject/git-php": "^4.6",
Expand All @@ -32,7 +32,7 @@
"symfony/yaml": "^7.4.23"
},
"require-dev": {
"alexskrypnyk/phpunit-helpers": "^1.2",
"alexskrypnyk/phpunit-helpers": "^1.2.1",
"alexskrypnyk/snapshot": "^1.6.0",
"bamarni/composer-bin-plugin": "^1.9.1",
"dealerdirect/phpcodesniffer-composer-installer": "^1.2.1",
Expand All @@ -45,13 +45,6 @@
"rector/rector": "^2.8.4",
"symfony/finder": "^7.4.23"
},
"repositories": [
{
"name": "prompty",
"type": "vcs",
"url": "https://github.com/AlexSkrypnyk/prompty"
}
],
"autoload": {
"psr-4": {
"DrevOps\\VortexInstaller\\": "src/"
Expand Down
Loading
Loading