Wordpress/.github/workflows/verify-npm-on-windows.yml
Jonathan Desrosiers 6d32bc5192 Build/Test Tools: Download Chromium for E2E tests only.
This prevents Chromium from being downloaded in workflows where it is not required.

See #49621, #50649, #50401.

git-svn-id: https://develop.svn.wordpress.org/trunk@49227 602fd350-edb4-49c9-b593-d223f7449a82
2020-10-20 13:52:28 +00:00

62 lines
1.6 KiB
YAML

name: Test NPM on Windows
on:
push:
branches:
- master
- '*.*'
pull_request:
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: ${{ true }}
jobs:
# Verifies that installing NPM dependencies and building WordPress works on Windows.
#
# Performs the following steps:
# - Checks out the repository.
# - Logs debug information about the runner container.
# - Installs NodeJS 12 (todo: install the version of NPM specified in the `.nvmrc` file to support older branches)
# - Sets up caching for NPM.
# _ Installs NPM dependencies.
# - Builds WordPress to run from the `build` directory.
test-npm:
name: Tests NPM on Windows
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Log debug information
run: |
npm --version
node --version
curl --version
git --version
svn --version
- name: Install NodeJS
uses: actions/setup-node@v1
with:
node-version: 12
- name: Get NPM cache directory
id: npm-cache
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Cache NodeJS modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install Dependencies
run: npm ci
- name: Build WordPress
run: npm run build