mirror of
https://github.com/hanzoai/prettier.git
synced 2026-09-24 17:02:04 +00:00
Delete upstream workflows
This fork does not ship upstream's releases, and its hosted-runner jobs never start here. Claude-Session: https://claude.ai/code/session_01HuMDfgFssPUptYUzgZ6Cp8
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Build Package
|
||||
run: yarn build --clean
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
if-no-files-found: error
|
||||
@@ -1,17 +0,0 @@
|
||||
name: autofix.ci # needed to securely identify the workflow
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
fix:
|
||||
name: Run automated fix
|
||||
uses: prettier/shared-workflows/.github/workflows/automated-fix.yml@c3ac99dd39893c2592fc5e6029420a1b90ad647b # main
|
||||
with:
|
||||
repository: prettier/prettier
|
||||
@@ -1,55 +0,0 @@
|
||||
name: Bundler Friendly
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# “At 00:00 on Sunday.” https://crontab.guru/#0_0_*_*_SUN
|
||||
- cron: "0 0 * * SUN"
|
||||
pull_request:
|
||||
paths:
|
||||
- "scripts/tools/bundle-test/**"
|
||||
# This workflow file
|
||||
- ".github/workflows/bundler-friendly.yml"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
|
||||
name: Build
|
||||
uses: ./.github/workflows/_build.yml
|
||||
|
||||
webpack:
|
||||
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
|
||||
name: Bundle Prettier with webpack
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
- name: Install Dependencies
|
||||
working-directory: scripts/tools/bundle-test
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Test
|
||||
working-directory: scripts/tools/bundle-test
|
||||
run: yarn test
|
||||
@@ -1,33 +0,0 @@
|
||||
name: Check Sizes
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
check-sizes:
|
||||
name: Check Sizes
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Check Sizes
|
||||
uses: preactjs/compressed-size-action@f322c295dde06a1cb7ccaef105732dd8a726d1d9 # 2.10.0
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
pattern: "./dist/**/*"
|
||||
compression: none
|
||||
build-script: "build --clean"
|
||||
@@ -1,41 +0,0 @@
|
||||
name: Cleanup cspell.json
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# “At 00:00 on day-of-month 1 in July.” https://crontab.guru/#0_0_1_7_*
|
||||
- cron: "0 0 1 7 *"
|
||||
|
||||
permissions:
|
||||
pull-requests: write
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
run:
|
||||
name: Cleanup cspell.json
|
||||
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Run script
|
||||
run: node scripts/clean-cspell.js
|
||||
|
||||
- name: Set current date env
|
||||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"
|
||||
|
||||
- uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
||||
with:
|
||||
commit-message: Cleanup cspell.json (${{ env.CURRENT_DATE }})
|
||||
branch: automated-cleanup-cspell-${{ env.CURRENT_DATE }}
|
||||
branch-suffix: timestamp
|
||||
title: Cleanup cspell.json (${{ env.CURRENT_DATE }})
|
||||
@@ -1,42 +0,0 @@
|
||||
name: CodeQL
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- next
|
||||
- v*
|
||||
- patch-release
|
||||
- "!renovate/**"
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- next
|
||||
- v*
|
||||
- patch-release
|
||||
- "!renovate/**"
|
||||
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
||||
with:
|
||||
config-file: ./.github/codeql/codeql-config.yml
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@e4fba868fa4b1b91e1fdab776edc8cfbe6e9fb81 # v4.37.3
|
||||
@@ -1,61 +0,0 @@
|
||||
name: Dev Package Test
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# “At 00:00 on Sunday.” https://crontab.guru/#0_0_*_*_SUN
|
||||
- cron: "0 0 * * SUN"
|
||||
pull_request:
|
||||
paths:
|
||||
- "package.json"
|
||||
- "yarn.lock"
|
||||
# This workflow file
|
||||
- ".github/workflows/dev-package-test.yml"
|
||||
- "tests/config/install-prettier.js"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- "ubuntu-latest"
|
||||
node:
|
||||
# Minimal version for development
|
||||
- "22"
|
||||
NPM_CLIENT:
|
||||
- "yarn"
|
||||
- "npm"
|
||||
- "pnpm"
|
||||
env:
|
||||
INSTALL_PACKAGE: true
|
||||
PRETTIER_INSTALL_NPM_CLIENT: ${{ matrix.NPM_CLIENT }}
|
||||
name: Test with ${{ matrix.NPM_CLIENT }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Install Client Package
|
||||
if: ${{ matrix.NPM_CLIENT == 'pnpm' }}
|
||||
run: npm install --global pnpm
|
||||
|
||||
- name: Run Tests
|
||||
run: yarn test:dev-package
|
||||
@@ -1,82 +0,0 @@
|
||||
name: Dev
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- next
|
||||
- v*
|
||||
- patch-release
|
||||
- "!renovate/**"
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- "ubuntu-latest"
|
||||
- "macos-latest"
|
||||
- "windows-latest"
|
||||
node:
|
||||
# Latest version
|
||||
- "26"
|
||||
# Minimal version for development
|
||||
- "22"
|
||||
include:
|
||||
- os: "ubuntu-latest"
|
||||
# Pick a version that is fast (normally highest LTS version)
|
||||
node: "26"
|
||||
ENABLE_CODE_COVERAGE: true
|
||||
FULL_TEST: true
|
||||
# Versions between "Latest version" and "Minimal version for development"
|
||||
# that not tested on linux
|
||||
# - os: "ubuntu-latest"
|
||||
# node: "22"
|
||||
env:
|
||||
ENABLE_CODE_COVERAGE: ${{ matrix.ENABLE_CODE_COVERAGE }}
|
||||
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 }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Run Tests
|
||||
if: ${{ !matrix.ENABLE_CODE_COVERAGE }}
|
||||
run: yarn test
|
||||
|
||||
- name: Run Tests (coverage)
|
||||
if: ${{ matrix.ENABLE_CODE_COVERAGE }}
|
||||
run: yarn c8 yarn test
|
||||
|
||||
- name: Upload Coverage
|
||||
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
if: ${{ matrix.ENABLE_CODE_COVERAGE && github.repository == 'prettier/prettier' }}
|
||||
with:
|
||||
fail_ci_if_error: true
|
||||
disable_search: true
|
||||
files: coverage/lcov.info
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
- name: "`--debug-benchmark` flag"
|
||||
if: ${{ matrix.os != 'windows-latest' }}
|
||||
run: node bin/prettier.cjs --debug-benchmark package.json 2>&1 >/dev/null | grep "Latency avg" || exit 1
|
||||
@@ -1,46 +0,0 @@
|
||||
name: Internal ESLint Plugin Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- next
|
||||
- v*
|
||||
- patch-release
|
||||
- "!renovate/**"
|
||||
paths:
|
||||
- "scripts/tools/eslint-plugin-prettier-internal-rules/**"
|
||||
# This workflow file
|
||||
- ".github/workflows/eslint-rules.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "scripts/tools/eslint-plugin-prettier-internal-rules/**"
|
||||
# This workflow file
|
||||
- ".github/workflows/eslint-rules.yml"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Test
|
||||
working-directory: scripts/tools/eslint-plugin-prettier-internal-rules
|
||||
run: yarn test-coverage
|
||||
@@ -1,111 +0,0 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- next
|
||||
- v*
|
||||
- patch-release
|
||||
- "!renovate/**"
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
node-version: "24"
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Check Dependencies
|
||||
run: yarn lint:deps
|
||||
|
||||
- name: Check JSDoc Types
|
||||
run: yarn lint:typecheck
|
||||
|
||||
- name: Lint ESLint
|
||||
run: yarn lint:eslint
|
||||
|
||||
- name: Lint Prettier
|
||||
run: yarn lint:prettier
|
||||
|
||||
- name: Spellcheck
|
||||
run: yarn lint:spellcheck
|
||||
|
||||
- name: Lint Changelog
|
||||
run: yarn lint:changelog
|
||||
|
||||
- name: Lint "format test"
|
||||
run: yarn lint:format-test
|
||||
|
||||
- name: Lint docs code block
|
||||
run: yarn prettier "{docs,website/versioned_docs/version-stable}/**/*.md" --check
|
||||
env:
|
||||
# Make Prettier throws on embedded format
|
||||
PRETTIER_DEBUG: true
|
||||
|
||||
- name: Lint workflow files
|
||||
run: |
|
||||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
||||
./actionlint -color
|
||||
shell: bash
|
||||
|
||||
- name: Dependency Review
|
||||
# Doesn't support push event https://github.com/actions/dependency-review-action/issues/826
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
|
||||
|
||||
- name: Validate renovate config
|
||||
run: yarn dlx --package renovate@latest renovate-config-validator
|
||||
|
||||
- name: Run yarn (/)
|
||||
run: |
|
||||
yarn
|
||||
yarn dedupe --check
|
||||
|
||||
- name: Run yarn (/website)
|
||||
working-directory: website
|
||||
run: |
|
||||
yarn
|
||||
yarn dedupe --check
|
||||
|
||||
- name: Run yarn (/scripts/release)
|
||||
working-directory: scripts/release
|
||||
run: |
|
||||
yarn
|
||||
yarn dedupe --check
|
||||
|
||||
- name: Run yarn (/scripts/tools/bundle-test)
|
||||
working-directory: scripts/tools/bundle-test
|
||||
run: |
|
||||
yarn
|
||||
yarn dedupe --check
|
||||
|
||||
- name: Run yarn (/scripts/tools/eslint-plugin-prettier-internal-rules)
|
||||
working-directory: scripts/tools/eslint-plugin-prettier-internal-rules
|
||||
run: |
|
||||
yarn
|
||||
yarn dedupe --check
|
||||
|
||||
- name: Knip
|
||||
run: yarn lint:knip
|
||||
|
||||
- name: Ensure no files changed
|
||||
run: node ./scripts/ensure-no-files-changed.js
|
||||
@@ -1,27 +0,0 @@
|
||||
name: "Lock"
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
schedule:
|
||||
# “At 00:00.” https://crontab.guru/#0_0_*_*_*
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
lock:
|
||||
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/lock-threads@89ae32b08ed1a541efecbab17912962a5e38981c # v6.0.2
|
||||
with:
|
||||
# https://github.com/dessant/lock-threads
|
||||
process-only: "issues"
|
||||
# github-token: ${{ github.token }}
|
||||
issue-inactive-days: "90"
|
||||
# exclude-issue-created-before: ""
|
||||
exclude-any-issue-labels: "keep-unlocked, status:awaiting response"
|
||||
add-issue-labels: "locked-due-to-inactivity"
|
||||
# issue-comment: ""
|
||||
issue-lock-reason: "resolved"
|
||||
@@ -1,31 +0,0 @@
|
||||
name: No Response
|
||||
|
||||
# Both `issue_comment` and `scheduled` event types are required for this Action
|
||||
# to work properly.
|
||||
on:
|
||||
issue_comment:
|
||||
types:
|
||||
- created
|
||||
schedule:
|
||||
# “At 00:00.” https://crontab.guru/#0_0_*_*_*
|
||||
- cron: "0 0 * * *"
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
no-response:
|
||||
if: github.event_name != 'schedule' || github.repository == 'prettier/prettier'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb # v0.5.0
|
||||
with:
|
||||
token: ${{ github.token }}
|
||||
daysUntilClose: 14
|
||||
responseRequiredLabel: "status:awaiting response"
|
||||
closeComment: >
|
||||
This issue has been automatically closed because there has been no response
|
||||
to our request for more information from the original author. With only the
|
||||
information that is currently in the issue, we don't have enough information
|
||||
to take action. Please reach out if you have or find the answers we need so
|
||||
that we can investigate further.
|
||||
@@ -1,24 +0,0 @@
|
||||
name: Prevent File change
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
paths:
|
||||
- "website/data/users.yml"
|
||||
|
||||
permissions:
|
||||
pull-requests: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
prevent-add-users:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
- name: Prevent file change
|
||||
uses: xalvarez/prevent-file-change-action@dbc67c205c9ed02aa39c497b422c24f364c3e8dd # v3.0.1
|
||||
with:
|
||||
githubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
pattern: website/data/users.yml
|
||||
@@ -1,266 +0,0 @@
|
||||
name: Prod
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- next
|
||||
- v*
|
||||
- patch-release
|
||||
- "!renovate/**"
|
||||
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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
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 version
|
||||
- "26"
|
||||
# Minimal version for production
|
||||
- "14"
|
||||
include:
|
||||
- os: "ubuntu-latest"
|
||||
# Pick a version that is fast (normally highest LTS version)
|
||||
node: "26"
|
||||
FULL_TEST: true
|
||||
# Versions not tested on linux
|
||||
- os: "ubuntu-latest"
|
||||
node: "24"
|
||||
- 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Install yarn@3
|
||||
if: ${{ matrix.node == '14' || matrix.node == '16' }}
|
||||
run: |
|
||||
yarn config unset approvedGitRepositories
|
||||
yarn config unset npmMinimalAgeGate
|
||||
yarn set version 3
|
||||
yarn config set httpRetry 10
|
||||
cat .yarnrc.yml
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.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@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
- name: Run Tests
|
||||
run: yarn test:production
|
||||
|
||||
- name: Run Format Tests (standalone)
|
||||
run: yarn test:production-standalone
|
||||
|
||||
- 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
|
||||
|
||||
browser:
|
||||
timeout-minutes: 15
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os:
|
||||
- "ubuntu-latest"
|
||||
# - "macos-latest"
|
||||
- "windows-latest"
|
||||
browser:
|
||||
- "chrome"
|
||||
- "firefox"
|
||||
include:
|
||||
# It's slow on firefox
|
||||
- os: "ubuntu-latest"
|
||||
browser: "chrome"
|
||||
FULL_TEST: true
|
||||
exclude:
|
||||
# Hangs https://github.com/prettier/prettier/pull/18716
|
||||
- os: "windows-latest"
|
||||
browser: "chrome"
|
||||
env:
|
||||
FULL_TEST: ${{ matrix.FULL_TEST }}
|
||||
TEST_RUNTIME_BROWSER: ${{ matrix.browser }}
|
||||
name: ${{ matrix.FULL_TEST && '[Full Test] ' || '' }} Browser(${{ matrix.browser }}) on ${{ startsWith(matrix.os, 'macos') && 'MacOS' || startsWith(matrix.os, 'windows') && 'Windows' || 'Linux' }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: [build]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
cache: "yarn"
|
||||
|
||||
- name: Puppeteer cache
|
||||
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
|
||||
with:
|
||||
path: .tmp/puppeteer/
|
||||
key: v1
|
||||
|
||||
# https://chromium.googlesource.com/chromium/src/+/main/docs/security/apparmor-userns-restrictions.md
|
||||
- run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
- name: Run Tests (ESM)
|
||||
env:
|
||||
TEST_BUNDLE_FORMAT: esm
|
||||
run: yarn test:production:browser
|
||||
|
||||
- name: Run Tests (UMD)
|
||||
env:
|
||||
TEST_BUNDLE_FORMAT: umd
|
||||
run: yarn test:production:browser
|
||||
|
||||
cli:
|
||||
name: CLI
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.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@820762786026740c76f36085b0efc47a31fe5020 # v7.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.js, 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
# `pkg-pr-new` requires Node.js v20
|
||||
node-version: latest
|
||||
|
||||
- name: Download Artifact
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
- name: Release
|
||||
working-directory: dist
|
||||
run: |
|
||||
yarn dlx pkg-pr-new publish "./*" --compact --packageManager=yarn
|
||||
@@ -1,47 +0,0 @@
|
||||
name: Release Script Test
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: scripts/release
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- patch-release
|
||||
- next
|
||||
paths:
|
||||
- "scripts/release/**"
|
||||
- ".github/workflows/release-script-test.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "scripts/release/**"
|
||||
- ".github/workflows/release-script-test.yml"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
||||
with:
|
||||
# Minimal version the release script required
|
||||
node-version: "20"
|
||||
cache: "yarn"
|
||||
|
||||
- name: Install Dependencies
|
||||
run: yarn install --immutable
|
||||
|
||||
- name: Test
|
||||
run: yarn test
|
||||
@@ -1,20 +0,0 @@
|
||||
name: Support requests
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [labeled, unlabeled, reopened]
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
support:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: dessant/support-requests@04320880d61b7fcaac4216e60522cb569478a63d # v5.0.2
|
||||
with:
|
||||
github-token: ${{ github.token }}
|
||||
support-label: "type:question"
|
||||
issue-comment: >
|
||||
:wave: @{issue-author}, we use the issue tracker exclusively for development purposes.
|
||||
For questions, please use [Stack Overflow](https://stackoverflow.com/questions/ask?tags=prettier).
|
||||
Reference in New Issue
Block a user