Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore/1196 dependency updates #1197

Merged
merged 4 commits into from
Jan 26, 2024
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
53 changes: 40 additions & 13 deletions .github/actions/install-cache-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,45 +5,72 @@ author: dgrebb
inputs:
WORKSPACE_ROOT:
description: Working Directory
BROWSER_BINARIES:
description: If the workflow needs BackstopJS testing, install and cache browser binaries.
default: "false"

runs:
using: composite
steps:
- name: ⚄ Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8
# - name: ⚄ Setup pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8

# - name: ⬢ Setup Node & pnpm Cache
# uses: actions/setup-node@v4
# with:
# node-version: ${{ env.NODE_VERSION }}
# cache: pnpm
# cache-dependency-path: |
# ${{ inputs.WORKSPACE_ROOT }}/package.json
# ${{ inputs.WORKSPACE_ROOT }}/pnpm-lock.yaml
# ${{ inputs.WORKSPACE_ROOT }}/node_modules

- name: ⬢ Setup Node & pnpm Cache
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: |
${{ inputs.WORKSPACE_ROOT }}/package.json
${{ inputs.WORKSPACE_ROOT }}/pnpm-lock.yaml
${{ inputs.WORKSPACE_ROOT }}/node_modules

- name: Install pnpm
shell: bash
run: npm install -g pnpm@8

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

- name: 🎭 Install & Cache Playwright Binaries
if: ${{ inputs.BROWSER_BINARIES }}
shell: bash
working-directory: ${{ inputs.WORKSPACE_ROOT }}
id: playwright-version
run: echo 'PLAYWRIGHT_VERSION=$(cat package.json | jq -r '.dependencies.playwright' || 'latest')' >> $GITHUB_ENV

- uses: actions/cache@v3
- uses: actions/cache@v4
if: ${{ inputs.BROWSER_BINARIES }}
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}

- shell: bash
if: steps.playwright-cache.outputs.cache-hit != 'true'
if: ${{ inputs.BROWSER_BINARIES && steps.playwright-cache.outputs.cache-hit != 'true' }}
working-directory: ${{ inputs.WORKSPACE_ROOT }}
run: npx playwright install --with-deps

- shell: bash
if: steps.playwright-cache.outputs.cache-hit != 'true'
if: ${{ inputs.BROWSER_BINARIES && steps.playwright-cache.outputs.cache-hit != 'true' }}
working-directory: ${{ inputs.WORKSPACE_ROOT }}
run: npx playwright install-deps

Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/backstop-remote.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,25 +32,13 @@ jobs:
token: ${{ github.token }}
fetch-depth: 1
sparse-checkout: |
_ci/backstop
.github/actions
_ci

- name: ⚄ Setup pnpm
uses: pnpm/action-setup@v2
- name: 🛢 Install Dependencies
uses: ./.github/actions/install-cache-deps
with:
version: 8

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: |
_ci/backstop/package.json
_ci/backstop/pnpm-lock.yaml
_ci/backstop/node_modules

- name: ↧ Install Dependencies
run: cd _ci/backstop && pnpm install && npx playwright install --with-deps
WORKSPACE_ROOT: _ci

- name: "Running Remote {ಠʖಠ}"
id: backstop
Expand Down
26 changes: 8 additions & 18 deletions .github/workflows/bd-fe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,14 @@ jobs:
ref: ${{ github.ref }}
token: ${{ github.token }}
fetch-depth: 1
sparse-checkout: |
.github/actions
front

- name: 🛢 Install Dependencies
uses: ./.github/actions/install-cache-deps
with:
WORKSPACE_ROOT: front

- name: 🤿 Set Vars
id: vars
Expand Down Expand Up @@ -135,24 +143,6 @@ jobs:
echo PUBLIC_ENV=${{ secrets.PUBLIC_ENV }} >> front/.env
cat front/.env

- name: ⚄ Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 8

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: |
front/package.json
front/pnpm-lock.yaml
front/node_modules

- name: ↧ Install Dependencies
run: cd front && pnpm install

- name: ↻ Build
run: |
cd front
Expand Down
22 changes: 5 additions & 17 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,14 @@ jobs:
token: ${{ github.token }}
fetch-depth: 1
sparse-checkout: |
.github/actions
front

- name: ⚄ Setup pnpm
uses: pnpm/action-setup@v2
- name: 🛢 Install Dependencies
uses: ./.github/actions/install-cache-deps
with:
version: 8

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: |
front/package.json
front/pnpm-lock.yaml
front/node_modules

- name: ↧ Install Dependencies
run: cd front && pnpm install
WORKSPACE_ROOT: front

- name: 👓 Check
run: |
cd front && npm run lint
cd front && pnpm check && pnpm lint
1 change: 1 addition & 0 deletions .github/workflows/test-backstop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jobs:
uses: ./.github/actions/install-cache-deps
with:
WORKSPACE_ROOT: _ci/backstop
BROWSER_BINARIES: true

- name: 🔥 Warmup Cache
run: ./_ci/_utils/warmup.sh ${{ inputs.env }}
Expand Down
28 changes: 5 additions & 23 deletions .github/workflows/test-lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,31 +43,13 @@ jobs:
token: ${{ github.token }}
fetch-depth: 1
sparse-checkout: |
_ci/_utils
_ci/perf
.github/actions
_ci

- name: ⚄ Setup pnpm
uses: pnpm/action-setup@v2
- name: 🛢 Install Dependencies
uses: ./.github/actions/install-cache-deps
with:
version: 8

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: |
_ci/perf/package.json
_ci/perf/pnpm-lock.yaml
_ci/perf/node_modules

- name: ↧ Install & Patch
run: |
cd _ci/perf && pnpm i

- name: 🌤️ Warmup CloudFront Cache
run: |
_ci/_utils/warmup.sh ${{ inputs.env }}
WORKSPACE_ROOT: _ci/perf

- name: 🔦 Lighthouse
id: lighthouse
Expand Down
24 changes: 5 additions & 19 deletions .github/workflows/test-psi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,27 +40,13 @@ jobs:
token: ${{ github.token }}
fetch-depth: 1
sparse-checkout: |
_ci/_utils
_ci/perf
.github/actions
_ci

- name: ⚄ Setup pnpm
uses: pnpm/action-setup@v2
- name: 🛢 Install Dependencies
uses: ./.github/actions/install-cache-deps
with:
version: 8

- name: ⬢ Setup Node & Cache
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: |
_ci/perf/package.json
_ci/perf/pnpm-lock.yaml
_ci/perf/node_modules

- name: ↧ Install & Patch
run: |
cd _ci/perf && pnpm i
WORKSPACE_ROOT: _ci/perf

- name: 🌤️ Warmup CloudFront Cache
run: |
Expand Down
1 change: 1 addition & 0 deletions back/config/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = ({ env }) => {
excludedTypes: ["admin-role", "i18n-locale", "user-role"],
excludedConfig: [
"core-store.core_admin_auth",
"core-store.plugin_content_manager_configuration_content_types::plugin::content-releases",
"core-store.core_admin_project-settings",
"core-store.plugin_users-permissions_grant",
"core-store.plugin_i18n_default_locale",
Expand Down
Loading
Loading