mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
DRY GHA workflows (#4294)
This commit is contained in:
parent
01eef2be99
commit
314ccca1f7
6 changed files with 63 additions and 116 deletions
38
.github/actions/setup-node-pnpm/action.yml
vendored
Normal file
38
.github/actions/setup-node-pnpm/action.yml
vendored
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
name: "Setup Node.js and pnpm"
|
||||
|
||||
description: "Sets up Node.js and pnpm with caching and installs dependencies"
|
||||
|
||||
inputs:
|
||||
node-version:
|
||||
description: "Node.js version to use"
|
||||
required: false
|
||||
default: "20.19.2"
|
||||
pnpm-version:
|
||||
description: "pnpm version to use"
|
||||
required: false
|
||||
default: "10.8.1"
|
||||
skip-install:
|
||||
description: "Skip dependency installation"
|
||||
required: false
|
||||
default: "false"
|
||||
install-args:
|
||||
description: "Additional arguments for pnpm install"
|
||||
required: false
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ inputs.pnpm-version }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ inputs.node-version }}
|
||||
cache: "pnpm"
|
||||
- name: Install dependencies
|
||||
if: ${{ inputs.skip-install != 'true' }}
|
||||
shell: bash
|
||||
run: pnpm install ${{ inputs.install-args }}
|
||||
16
.github/workflows/changeset-release.yml
vendored
16
.github/workflows/changeset-release.yml
vendored
|
|
@ -9,8 +9,6 @@ on:
|
|||
env:
|
||||
REPO_PATH: ${{ github.repository }}
|
||||
GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }}
|
||||
NODE_VERSION: 20.19.2
|
||||
PNPM_VERSION: 10.8.1
|
||||
|
||||
jobs:
|
||||
# Job 1: Create version bump PR when changesets are merged to main
|
||||
|
|
@ -31,18 +29,10 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
ref: ${{ env.GIT_REF }}
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pnpm install
|
||||
skip-checkout: 'true'
|
||||
|
||||
# Check if there are any new changesets to process
|
||||
- name: Check for changesets
|
||||
|
|
|
|||
69
.github/workflows/code-qa.yml
vendored
69
.github/workflows/code-qa.yml
vendored
|
|
@ -8,27 +8,14 @@ on:
|
|||
types: [opened, reopened, ready_for_review, synchronize]
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
NODE_VERSION: 20.19.2
|
||||
PNPM_VERSION: 10.8.1
|
||||
|
||||
jobs:
|
||||
check-translations:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
- name: Verify all translations are complete
|
||||
run: node scripts/find-missing-translations.js
|
||||
|
||||
|
|
@ -37,17 +24,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
- name: Run knip checks
|
||||
run: pnpm knip
|
||||
|
||||
|
|
@ -56,17 +34,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
- name: Lint
|
||||
run: pnpm lint
|
||||
- name: Check types
|
||||
|
|
@ -80,17 +49,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
- name: Run unit tests
|
||||
run: pnpm test
|
||||
|
||||
|
|
@ -116,17 +76,8 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
- name: Create .env.local file
|
||||
working-directory: apps/vscode-e2e
|
||||
run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.local
|
||||
|
|
|
|||
15
.github/workflows/marketplace-publish.yml
vendored
15
.github/workflows/marketplace-publish.yml
vendored
|
|
@ -7,8 +7,6 @@ on:
|
|||
|
||||
env:
|
||||
GIT_REF: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || 'main' }}
|
||||
NODE_VERSION: 20.19.2
|
||||
PNPM_VERSION: 10.8.1
|
||||
|
||||
jobs:
|
||||
publish-extension:
|
||||
|
|
@ -25,17 +23,10 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.GIT_REF }}
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
skip-checkout: 'true'
|
||||
- name: Configure Git
|
||||
run: |
|
||||
git config user.name "github-actions[bot]"
|
||||
|
|
|
|||
18
.github/workflows/nightly-publish.yml
vendored
18
.github/workflows/nightly-publish.yml
vendored
|
|
@ -8,10 +8,6 @@ on:
|
|||
branches: [main]
|
||||
workflow_dispatch: # Allows manual triggering.
|
||||
|
||||
env:
|
||||
NODE_VERSION: 20.19.2
|
||||
PNPM_VERSION: 10.8.1
|
||||
|
||||
jobs:
|
||||
publish-nightly:
|
||||
runs-on: ubuntu-latest
|
||||
|
|
@ -25,17 +21,11 @@ jobs:
|
|||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
skip-checkout: 'true'
|
||||
install-args: '--frozen-lockfile'
|
||||
- name: Forge numeric Nightly version
|
||||
id: version
|
||||
env:
|
||||
|
|
|
|||
23
.github/workflows/update-contributors.yml
vendored
23
.github/workflows/update-contributors.yml
vendored
|
|
@ -4,36 +4,23 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch: # Allows manual triggering
|
||||
|
||||
env:
|
||||
NODE_VERSION: 20.19.2
|
||||
PNPM_VERSION: 10.8.1
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
update-contributors:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # Needed for pushing changes
|
||||
pull-requests: write # Needed for creating PRs
|
||||
contents: write # Needed for pushing changes.
|
||||
pull-requests: write # Needed for creating PRs.
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Install pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: ${{ env.PNPM_VERSION }}
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: 'pnpm'
|
||||
- name: Setup Node.js and pnpm
|
||||
uses: ./.github/actions/setup-node-pnpm
|
||||
- name: Disable Husky
|
||||
run: |
|
||||
echo "HUSKY=0" >> $GITHUB_ENV
|
||||
git config --global core.hooksPath /dev/null
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Update contributors and format
|
||||
run: |
|
||||
pnpm update-contributors
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue