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
36 changes: 36 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Setup
description: Install pnpm, Node.js and the monorepo dependencies, after checking out the repository

inputs:
node-version:
description: Node.js version to install
default: lts/*
cache:
description: Cache the pnpm store, off by default because a poisoned cache is a supply chain risk
default: 'false'
install:
description: Install the monorepo dependencies
default: 'true'

runs:
using: composite
steps:
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false

- name: Set up Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ inputs.node-version }}
check-latest: true
cache: ${{ inputs.cache == 'true' && 'pnpm' || '' }}
package-manager-cache: false

- name: Install dependencies
if: inputs.install == 'true'
shell: bash
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
3 changes: 2 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ updates:
########################
# GITHUB ACTIONS UPDATES
- package-ecosystem: github-actions
directory: '/'
# Composite actions must be listed: '/' only scans .github/workflows
directories: ['/', '/.github/actions/setup']
schedule:
interval: weekly
open-pull-requests-limit: 99
Expand Down
18 changes: 3 additions & 15 deletions .github/workflows/argos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,22 +38,10 @@ jobs:
- name: Check out repository code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false

- name: Use Node.js
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: lts/*
check-latest: true
cache: pnpm

- name: Install dependencies
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true

# Playwright is a dependency of the argos workspace package
# With the pnpm isolated nodeLinker, its binary isn't available at the root
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/build-blog-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Set up Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: lts/*
check-latest: true
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true
- name: Build blog-only
run: pnpm --filter website build:blogOnly
env:
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/build-perf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- docusaurus-v**
paths:
- .github/workflows/build-perf.yml
- .github/actions/**
- package.json
- pnpm-lock.yaml
- packages/**
Expand Down Expand Up @@ -87,20 +88,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Set up Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
with:
node-version: lts/*
check-latest: true
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true

# Ensure build with a cold cache does not increase too much
- name: Build (cold cache)
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Set up Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: lts/*
check-latest: true
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true
- name: Check immutable pnpm-lock.yaml
run: git diff --exit-code

Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/showcase-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,9 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Set up Node
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: lts/*
check-latest: true
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true
- name: Test
run: pnpm test website/src/data/__tests__/user.test.ts
83 changes: 17 additions & 66 deletions .github/workflows/tests-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ on:
- admin/verdaccio.yaml
- admin/scripts/test-release.sh
- .github/workflows/tests-e2e.yml
- .github/actions/**
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -43,22 +44,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Use Node.js LTS
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: lts/*
check-latest: true
# No pnpm cache on Windows on purpose: restoring it takes 20-80s,
# more than it saves on "pnpm install"
package-manager-cache: false
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
# No pnpm cache on Windows on purpose: restoring it takes 20-80s,
# more than it saves on "pnpm install"
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
- name: Generate test-website project against main branch
# Not using test-release.sh => no verdaccio docker image on Windows
# We have to generate the test website in workspace so that it uses
Expand Down Expand Up @@ -103,19 +92,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
- name: Set up pnpm, Node.js ${{ matrix.node }} and dependencies
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true
- name: Generate test-website project against main branch
run: pnpm test:build:website -s
- name: Install test-website project with Yarn v1
Expand Down Expand Up @@ -150,20 +131,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Use Node.js LTS
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: lts/*
check-latest: true
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true
- name: Generate test-website project with ${{ matrix.variant }} against main branch
run: pnpm test:build:website ${{ matrix.variant }}
- name: Install test-website project with Yarn Berry and nodeLinker = ${{ matrix.nodeLinker }}
Expand Down Expand Up @@ -236,20 +207,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Use Node.js LTS
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
with:
node-version: lts/*
check-latest: true
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true
- name: Generate test-website project against main branch
run: pnpm test:build:website -st
- name: Install test-website project with npm
Expand Down Expand Up @@ -283,20 +244,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Use Node.js LTS
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
with:
node-version: lts/*
check-latest: true
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true
- name: Generate test-website project against main branch
run: pnpm test:build:website -st
- name: Install test-website project with pnpm
Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/tests-swizzle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
- name: Set up pnpm, Node.js and dependencies
uses: ./.github/actions/setup
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Set up Node LTS
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: lts/*
check-latest: true
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true

# Swizzle all the theme components
- name: Swizzle (${{matrix.action}} - ${{matrix.variant}})
Expand Down
18 changes: 5 additions & 13 deletions .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- packages/**
- tsconfig.*.json
- .github/workflows/tests-windows.yml
- .github/actions/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -34,21 +35,12 @@ jobs:
run: git config --system core.longpaths true
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
# No pnpm cache on Windows on purpose: restoring it takes 20-80s,
# more than it saves on "pnpm install"
- name: Set up pnpm, Node.js ${{ matrix.node }} and dependencies
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node }}
# No pnpm cache on Windows on purpose: restoring it takes 20-80s,
# more than it saves on "pnpm install"
package-manager-cache: false
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
- name: Docusaurus Tests
run: pnpm test
- name: Create a deep path
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ on:
- packages/**
- tsconfig.*.json
- .github/workflows/tests.yml
- .github/actions/**

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -32,19 +33,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Install pnpm
uses: pnpm/setup@fa36a5ef7dcdefc3a7cb25655c122e00cf6e636e # v3.1.2
with:
# Only install pnpm: Node.js and dependencies are installed by later steps
install: false
node-version-file: false
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
- name: Set up pnpm, Node.js ${{ matrix.node }} and dependencies
uses: ./.github/actions/setup
with:
node-version: ${{ matrix.node }}
cache: pnpm
- name: Installation
run: pnpm install --frozen-lockfile || pnpm install --frozen-lockfile || pnpm install --frozen-lockfile
cache: true
- name: Test
run: pnpm test
- name: TypeCheck tests
Expand Down
Loading