From 30903b706094c4b67582ee9172b491d603e93889 Mon Sep 17 00:00:00 2001 From: John Yang Date: Wed, 21 Aug 2024 11:07:43 -0400 Subject: [PATCH] Removed .github/workflows --- .github/workflows/_build.yml | 33 ----- .github/workflows/bundler-friendly.yml | 55 -------- .github/workflows/check-sizes.yml | 33 ----- .github/workflows/codeql.yml | 40 ------ .github/workflows/dev-package-test.yml | 62 --------- .github/workflows/dev-test.yml | 77 ----------- .github/workflows/eslint-rules.yml | 43 ------ .github/workflows/lint.yml | 100 -------------- .github/workflows/lock.yml | 25 ---- .github/workflows/mark-issue-duplicate.yml | 21 --- .github/workflows/no-response.yml | 31 ----- .github/workflows/prevent-file-change.yml | 24 ---- .github/workflows/prod-test.yml | 152 --------------------- .github/workflows/release-script-test.yml | 47 ------- .github/workflows/support.yml | 20 --- 15 files changed, 763 deletions(-) delete mode 100644 .github/workflows/_build.yml delete mode 100644 .github/workflows/bundler-friendly.yml delete mode 100644 .github/workflows/check-sizes.yml delete mode 100644 .github/workflows/codeql.yml delete mode 100644 .github/workflows/dev-package-test.yml delete mode 100644 .github/workflows/dev-test.yml delete mode 100644 .github/workflows/eslint-rules.yml delete mode 100644 .github/workflows/lint.yml delete mode 100644 .github/workflows/lock.yml delete mode 100644 .github/workflows/mark-issue-duplicate.yml delete mode 100644 .github/workflows/no-response.yml delete mode 100644 .github/workflows/prevent-file-change.yml delete mode 100644 .github/workflows/prod-test.yml delete mode 100644 .github/workflows/release-script-test.yml delete mode 100644 .github/workflows/support.yml diff --git a/.github/workflows/_build.yml b/.github/workflows/_build.yml deleted file mode 100644 index 0d2b2de87..000000000 --- a/.github/workflows/_build.yml +++ /dev/null @@ -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@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - cache: "yarn" - - - name: Install Dependencies - run: yarn install --immutable - - - name: Build Package - run: yarn build --clean - - - name: Upload Artifact - uses: actions/upload-artifact@v4 - with: - name: dist - path: dist - if-no-files-found: error diff --git a/.github/workflows/bundler-friendly.yml b/.github/workflows/bundler-friendly.yml deleted file mode 100644 index da43cd592..000000000 --- a/.github/workflows/bundler-friendly.yml +++ /dev/null @@ -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@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - cache: "yarn" - - - name: Install Dependencies - run: yarn install --immutable - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: dist - path: dist - - - name: Install Dependencies - run: yarn install --immutable - working-directory: scripts/tools/bundle-test - - - name: Test - run: yarn test - working-directory: scripts/tools/bundle-test diff --git a/.github/workflows/check-sizes.yml b/.github/workflows/check-sizes.yml deleted file mode 100644 index 9256bd7a8..000000000 --- a/.github/workflows/check-sizes.yml +++ /dev/null @@ -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@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - cache: "yarn" - - - name: Check Sizes - uses: preactjs/compressed-size-action@2.6.0 - with: - repo-token: "${{ secrets.GITHUB_TOKEN }}" - pattern: "./dist/**/*" - compression: none - build-script: "build --clean" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml deleted file mode 100644 index 459e599b9..000000000 --- a/.github/workflows/codeql.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: CodeQL - -on: - push: - branches: - - main - - patch-release - - next - - "!renovate/**" - pull_request: - branches: - - main - - patch-release - - next - - "!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@v4 - - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - config-file: ./.github/codeql/codeql-config.yml - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/dev-package-test.yml b/.github/workflows/dev-package-test.yml deleted file mode 100644 index c126d1a19..000000000 --- a/.github/workflows/dev-package-test.yml +++ /dev/null @@ -1,62 +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: 60 - strategy: - fail-fast: false - matrix: - os: - - "ubuntu-latest" - node: - # Minimal version for development - - "18" - NPM_CLIENT: - - "yarn" - # Disabled temporarily #13151 - # - "npm" - - "pnpm" - env: - INSTALL_PACKAGE: true - NPM_CLIENT: ${{ matrix.NPM_CLIENT }} - name: Test with ${{ matrix.NPM_CLIENT }} - runs-on: ${{ matrix.os }} - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - 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 diff --git a/.github/workflows/dev-test.yml b/.github/workflows/dev-test.yml deleted file mode 100644 index 1d698f00f..000000000 --- a/.github/workflows/dev-test.yml +++ /dev/null @@ -1,77 +0,0 @@ -name: Dev - -on: - push: - branches: - - main - - patch-release - - next - pull_request: - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - test: - timeout-minutes: 60 - strategy: - fail-fast: false - matrix: - os: - - "ubuntu-latest" - - "macos-latest" - - "windows-latest" - node: - # Latest even version - - "22" - # Minimal version for development - - "18" - include: - - os: "ubuntu-latest" - # Pick a version that is fast (normally highest LTS version) - node: "22" - ENABLE_CODE_COVERAGE: true - FULL_TEST: true - CHECK_TEST_PARSERS: 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: "20" - env: - ENABLE_CODE_COVERAGE: ${{ matrix.ENABLE_CODE_COVERAGE }} - FULL_TEST: ${{ matrix.FULL_TEST }} - CHECK_TEST_PARSERS: ${{ matrix.CHECK_TEST_PARSERS }} - 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@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - 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@v4 - if: ${{ matrix.ENABLE_CODE_COVERAGE }} - with: - fail_ci_if_error: true - files: coverage/lcov.info - token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.github/workflows/eslint-rules.yml b/.github/workflows/eslint-rules.yml deleted file mode 100644 index 5a7eb5b8d..000000000 --- a/.github/workflows/eslint-rules.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Internal_ESLint_Rules_Test - -on: - push: - branches: - - main - - patch-release - - next - 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@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - cache: "yarn" - - - name: Install Dependencies - run: yarn install --immutable - - - name: Test - run: cd scripts/tools/eslint-plugin-prettier-internal-rules && yarn test-coverage diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index a687fe657..000000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,100 +0,0 @@ -name: Lint - -on: - push: - branches: - - main - - patch-release - - next - 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@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - 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 blog post - run: yarn lint:blog - - - name: Lint docs code block - run: yarn prettier "{docs,website/versioned_docs/version-stable}/**/*.md" --check - env: - # Make Prettier throws on embeded 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: Validate renovate config - run: npx --package renovate -c renovate-config-validator - - - name: Run yarn (/) - run: | - yarn - yarn dedupe --check - - - name: Run yarn (/website) - run: | - yarn - yarn dedupe --check - working-directory: website - - - name: Run yarn (/scripts/release) - run: | - yarn - yarn dedupe --check - working-directory: scripts/release - - - name: Run yarn (/scripts/tools/bundle-test) - run: | - yarn - yarn dedupe --check - working-directory: scripts/tools/bundle-test - - - name: Run yarn (/scripts/tools/eslint-plugin-prettier-internal-rules) - run: | - yarn - yarn dedupe --check - working-directory: scripts/tools/eslint-plugin-prettier-internal-rules - - - name: Check File Changes - run: echo "Listing changed files:" && git diff --name-only --exit-code && echo "No files changed during lint." diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml deleted file mode 100644 index 7cd90919f..000000000 --- a/.github/workflows/lock.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: "Lock" - -on: - 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@v5 - with: - # https://github.com/dessant/lock-threads - 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" diff --git a/.github/workflows/mark-issue-duplicate.yml b/.github/workflows/mark-issue-duplicate.yml deleted file mode 100644 index 47fad8cf8..000000000 --- a/.github/workflows/mark-issue-duplicate.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Mark Issue Duplicate - -on: - issue_comment: - types: - - created - -permissions: - issues: write - -jobs: - mark-duplicate: - runs-on: ubuntu-latest - if: ${{ !github.event.issue.pull_request && startsWith(github.event.comment.body, 'Duplicate of ') }} - steps: - - uses: actions-cool/issues-helper@v3.6.0 - with: - actions: "mark-duplicate" - token: ${{ secrets.GITHUB_TOKEN }} - duplicate-labels: "type:duplicate" - close-issue: true diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml deleted file mode 100644 index e2ce85eac..000000000 --- a/.github/workflows/no-response.yml +++ /dev/null @@ -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@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. diff --git a/.github/workflows/prevent-file-change.yml b/.github/workflows/prevent-file-change.yml deleted file mode 100644 index a95c70f6e..000000000 --- a/.github/workflows/prevent-file-change.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Prevent File change - -on: - pull_request: - paths: - - "website/data/users.yml" - -permissions: - contents: read - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - prevent-add-users: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Prevent file change - uses: xalvarez/prevent-file-change-action@v1.6.0 - with: - githubToken: ${{ secrets.GITHUB_TOKEN }} - pattern: website/data/users.yml diff --git a/.github/workflows/prod-test.yml b/.github/workflows/prod-test.yml deleted file mode 100644 index 61b25b2e0..000000000 --- a/.github/workflows/prod-test.yml +++ /dev/null @@ -1,152 +0,0 @@ -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@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - cache: "yarn" - - - name: Install Dependencies - run: yarn install --immutable - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: dist - path: dist - - - name: Lint Code - run: yarn test:dist-lint - - test: - timeout-minutes: 90 - strategy: - fail-fast: false - matrix: - os: - - "ubuntu-latest" - - "macos-latest" - - "windows-latest" - node: - # Latest even version - - "22" - # Minimal version for production - - "14" - include: - - os: "ubuntu-latest" - # Pick a version that is fast (normally highest LTS version) - node: "22" - 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: "20" - - os: "ubuntu-latest" - node: "18" - - os: "ubuntu-latest" - node: "16" - # Tests on Intel Mac x Node.js 14 - - os: "macos-13" - 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@v4 - - - name: Install yarn@3 - if: ${{ matrix.node == '14' || matrix.node == '16' }} - run: | - yarn set version 3 - cat .yarnrc.yml - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - cache: "yarn" - - # `jest@30.0.0-alpha.2` is the last version that supports Node.js v14 - - name: Install jest@30.0.0-alpha.2 - if: ${{ matrix.node == '14' }} - run: node ./scripts/prepare-nodejs-14-test.js - - - 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@v4 - with: - name: dist - path: dist - - - name: Run Tests - run: yarn test:dist - - - name: Run Format Tests (standalone) - run: yarn test:dist-standalone - - cli: - name: CLI - runs-on: ubuntu-latest - needs: [build] - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: "0.10.48" - - - name: Download Artifact - uses: actions/download-artifact@v4 - with: - name: dist - path: dist - - - name: Validate Node.js Version - run: node -v | grep "v0.10.48" || exit 1 - - - name: Run CLI on Node.js v0.10.48 - run: node dist/bin/prettier.cjs --version 2>&1 >/dev/null | grep "prettier requires at least version 14 of Node, please upgrade" || exit 1 diff --git a/.github/workflows/release-script-test.yml b/.github/workflows/release-script-test.yml deleted file mode 100644 index 9920e8aac..000000000 --- a/.github/workflows/release-script-test.yml +++ /dev/null @@ -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@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - # Minimal version the release script required - node-version: "18" - cache: "yarn" - - - name: Install Dependencies - run: yarn install --immutable - - - name: Test - run: yarn test diff --git a/.github/workflows/support.yml b/.github/workflows/support.yml deleted file mode 100644 index 52e0b71ad..000000000 --- a/.github/workflows/support.yml +++ /dev/null @@ -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@v4.0.0 - 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).