Skip to content

Update dependency html-ua-styles to v0.3.1 (#18494) #32117

Update dependency html-ua-styles to v0.3.1 (#18494)

Update dependency html-ua-styles to v0.3.1 (#18494) #32117

Workflow file for this run

name: Prod
on:
push:
branches:
- main
- patch-release
- next
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
uses: ./.github/workflows/_build.yml
lint:
name: Lint
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
cache: "yarn"
- name: Install Dependencies
run: yarn install --immutable
- name: Download Artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: dist
path: dist
- name: Lint Code
run: yarn test:production-lint
test:
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os:
- "ubuntu-latest"
- "macos-latest"
- "windows-latest"
node:
# Latest even version
- "24"
# Minimal version for production
- "14"
include:
- os: "ubuntu-latest"
# Pick a version that is fast (normally highest LTS version)
node: "24"
FULL_TEST: true
# Versions not tested on linux, normally only even versions
# If latest version is an odd number, it can be listed below too
- os: "ubuntu-latest"
node: "25"
- os: "ubuntu-latest"
node: "22"
- os: "ubuntu-latest"
node: "20"
- os: "ubuntu-latest"
node: "18"
- os: "ubuntu-latest"
node: "16"
# Tests on Intel Mac x Node.js 14 ( https://github.com/prettier/prettier/issues/16248 )
- os: "macos-15-intel"
node: "14"
# setup-node does not support Node.js 14 x M1 Mac
exclude:
- os: "macos-latest"
node: "14"
env:
FULL_TEST: ${{ matrix.FULL_TEST }}
name: ${{ matrix.FULL_TEST && '[Full Test] ' || '' }} Node.js ${{ matrix.node }} on ${{ startsWith(matrix.os, 'macos') && 'MacOS' || startsWith(matrix.os, 'windows') && 'Windows' || 'Linux' }}
runs-on: ${{ matrix.os }}
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Install yarn@3
if: ${{ matrix.node == '14' || matrix.node == '16' }}
run: |
yarn set version 3
yarn config set httpRetry 10
cat .yarnrc.yml
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: ${{ matrix.node }}
cache: "yarn"
- name: Downgrade Jest
if: ${{ matrix.node == '14' || matrix.node == '16' }}
run: node ./scripts/prepare-test-for-legacy-nodejs.js --node-version ${{ matrix.node }}
- name: Install Dependencies(yarn@3,mutable)
if: ${{ matrix.node == '14' || matrix.node == '16' }}
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
run: yarn install
- name: Install Dependencies
run: yarn install --immutable
- name: Download Artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: dist
path: dist
- name: Run Tests
if: matrix.node != '14'
run: yarn test:production
- name: Run Tests (Node.js 14)
if: matrix.node == '14'
run: yarn test:production-node14
- name: Run Format Tests (standalone)
if: matrix.node != '14'
run: yarn test:production-standalone
- name: Run Format Tests (standalone, Node.js 14)
if: matrix.node == '14'
run: yarn test:production-standalone-node14
- name: "`--debug-benchmark` flag"
if: ${{ matrix.node != '14' && matrix.os != 'windows-latest' }}
working-directory: dist/prettier
run: node bin/prettier.cjs --debug-benchmark package.json 2>&1 >/dev/null | grep "Latency avg" || exit 1
cli:
name: CLI
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Download Artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: dist
path: dist
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
package-manager-cache: false
- name: "`--debug-benchmark` flag"
working-directory: dist/prettier
run: node bin/prettier.cjs --debug-benchmark package.json 2>&1 >/dev/null | grep "'--debug-benchmark' requires the 'tinybench' package to be installed." || exit 1
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: "0.10.48"
package-manager-cache: false
- name: Validate Node.js Version
run: node -v | grep "v0.10.48" || exit 1
- name: Run CLI on Node.js v0.10.48
working-directory: dist/prettier
run: node bin/prettier.cjs --version 2>&1 >/dev/null | grep "prettier requires at least version 14 of Node, please upgrade" || exit 1
preview:
if: github.repository == 'prettier/prettier'
name: Preview release
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
# `pkg-pr-new` requires Node.js v20
node-version: latest
- name: Download Artifact
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: dist
path: dist
- name: Release
working-directory: dist
run: |
yarn dlx pkg-pr-new publish "./*" --compact --packageManager=yarn