Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/actions/setup-node-pnpm/action.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 3 additions & 13 deletions .github/workflows/changeset-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
69 changes: 10 additions & 59 deletions .github/workflows/code-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
15 changes: 3 additions & 12 deletions .github/workflows/marketplace-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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]"
Expand Down
18 changes: 4 additions & 14 deletions .github/workflows/nightly-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -25,17 +21,11 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v4
- name: Setup Node.js and pnpm
uses: ./.github/actions/setup-node-pnpm
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:
Expand Down
23 changes: 5 additions & 18 deletions .github/workflows/update-contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading