Files
backstage/.github/workflows/verify_e2e-windows.yml
T
Fredrik Adelöw ebcc8b7ca9 ci: enable corepack in setup-node steps
The actions/setup-node@v6.4.0 upgrade stopped auto-shimming yarn onto
PATH via corepack. The yarn-plugin test spawns yarn via Node's
child_process.spawn() which does a raw PATH lookup, causing
ENOENT failures. Adding corepack: true ensures the yarn shim is
available.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2026-05-28 10:20:37 +02:00

95 lines
3.1 KiB
YAML

# Building on windows is really slow, so this workflow is separate from e2e.yml and only builds on changes
# to the cli itself. They're more likely to introduce issues on windows, compared to changes to core and yarn.lock.
name: E2E Windows
on:
# NOTE: If you change these you must update verify_e2e-windows-noop.yml as well
pull_request:
paths:
- 'yarn.lock'
- '.github/workflows/verify_e2e-windows.yml'
- 'packages/cli/**'
- 'packages/e2e-test/**'
- 'packages/create-app/**'
push:
branches: [master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: windows-2025
strategy:
matrix:
node-version: [22.x, 24.x]
env:
CI: true
NODE_OPTIONS: --max-old-space-size=8192 --experimental-vm-modules
name: E2E Windows ${{ matrix.node-version }}
steps:
- name: Harden Runner
uses: step-security/harden-runner@58077d3c7e43986b6b15fba718e8ea69e387dfcc # v2.15.1
with:
egress-policy: audit
# In order to have the create-app template function as if it was downloaded from NPM
# we need to make sure we checkout files with LF line endings only
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Configure Git
run: |
git config --global user.email noreply@backstage.io
git config --global user.name 'GitHub e2e user'
- name: use node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
corepack: true
- name: setup python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: '3.10'
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@30375c66a4eea26614e0d39710365f22f8b0af57 # v3.0.0
- name: Setup gyp env
run: |
echo 'GYP_MSVS_VERSION=2022' >> $Env:GITHUB_ENV
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
- name: Install latest gyp and set node-gyp path
shell: powershell
run: |
npm prefix -g | % {npm config set dev_dir "c:\temp\.gyp2"}
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
- name: setup chrome
uses: browser-actions/setup-chrome@803ef6dfb4fdf22089c9563225d95e4a515820a0 # latest
- name: yarn install
uses: backstage/actions/yarn-install@2cd6978b476cbdc39fec48346f8b6ca13199dd6a # v0.7.8
with:
cache-prefix: ${{ runner.os }}-v${{ matrix.node-version }}
- run: yarn tsc
- run: yarn backstage-cli repo build
- name: run E2E test
run: yarn e2e-test run
env:
DEBUG: zombie
CYPRESS_VERIFY_TIMEOUT: 600000