dev: switch to pnpm and update devcontainer (#7663)
Co-authored-by: Michael Genson <genson.michael@gmail.com>
This commit is contained in:
1 parent
ed2f87907b
commit
4229d7eb2a
20 files changed
+15252
-10950
No files matched your search
@@ -2,7 +2,7 @@ name: Auto-merge dependency PRs
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, labeled]
|
||||
types: [ opened, synchronize, labeled ]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -46,7 +46,7 @@ jobs:
|
||||
if [[ "$file" == "pyproject.toml" ]] || \
|
||||
[[ "$file" == "uv.lock" ]] || \
|
||||
[[ "$file" == "frontend/package.json" ]] || \
|
||||
[[ "$file" == "frontend/yarn.lock" ]] || \
|
||||
[[ "$file" == "frontend/pnpm-lock.yaml" ]] || \
|
||||
[[ "$file" =~ ^docker/ ]]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
@@ -21,31 +21,29 @@ jobs:
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
|
||||
# Work around pnpm/action-setup v6 resolving the wrong version from package.json
|
||||
# https://github.com/pnpm/action-setup/issues/227
|
||||
- name: Read pnpm version
|
||||
id: pnpm-version
|
||||
run: 'echo "version=$(jq --raw-output ''.packageManager | split("@")[1]'' package.json)" >> "$GITHUB_OUTPUT"'
|
||||
working-directory: "frontend"
|
||||
- uses: pnpm/action-setup@v6
|
||||
with:
|
||||
version: ${{ steps.pnpm-version.outputs.version }}
|
||||
|
||||
- name: Setup node env 🏗
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
check-latest: true
|
||||
|
||||
- name: Get yarn cache directory path 🛠
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache node_modules 📦
|
||||
uses: actions/cache@v5
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
node-version: 24
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: "**/pnpm-lock.yaml"
|
||||
|
||||
- name: Install dependencies 👨🏻💻
|
||||
run: yarn
|
||||
run: pnpm install --prefer-offline
|
||||
working-directory: "frontend"
|
||||
|
||||
- name: Run Build 🚚
|
||||
run: yarn generate
|
||||
run: pnpm generate
|
||||
working-directory: "frontend"
|
||||
|
||||
- name: Archive built frontend
|
||||
|
||||
+48
-40
@@ -10,43 +10,51 @@ jobs:
|
||||
run:
|
||||
working-directory: ./tests/e2e
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
cache: 'yarn'
|
||||
cache-dependency-path: ./tests/e2e/yarn.lock
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
- name: Retrieve Python package
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: backend-dist
|
||||
path: dist
|
||||
- name: Build Image
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
file: ./docker/Dockerfile
|
||||
context: .
|
||||
build-contexts: |
|
||||
packages=dist
|
||||
push: false
|
||||
load: true
|
||||
tags: mealie:e2e
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: Deploy E2E Test Environment
|
||||
run: docker compose up -d
|
||||
working-directory: ./tests/e2e/docker
|
||||
- name: Install dependencies
|
||||
run: npm install -g yarn && yarn
|
||||
- name: Install Playwright Browsers
|
||||
run: yarn playwright install --with-deps
|
||||
- name: Check test environment
|
||||
run: docker ps
|
||||
- name: Run Playwright tests
|
||||
run: yarn playwright test
|
||||
- name: Destroy Test Environment
|
||||
if: always()
|
||||
run: docker compose down --volumes
|
||||
working-directory: ./tests/e2e/docker
|
||||
- uses: actions/checkout@v6
|
||||
# Work around pnpm/action-setup v6 resolving the wrong version from package.json
|
||||
# https://github.com/pnpm/action-setup/issues/227
|
||||
- name: Read pnpm version
|
||||
id: pnpm-version
|
||||
run: 'echo "version=$(jq --raw-output ''.packageManager | split("@")[1]'' package.json)" >> "$GITHUB_OUTPUT"'
|
||||
- uses: pnpm/action-setup@v6
|
||||
with:
|
||||
version: ${{ steps.pnpm-version.outputs.version }}
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 24
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: "**/pnpm-lock.yaml"
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
- name: Retrieve Python package
|
||||
uses: actions/download-artifact@v6
|
||||
with:
|
||||
name: backend-dist
|
||||
path: dist
|
||||
- name: Build Image
|
||||
uses: docker/build-push-action@v7
|
||||
with:
|
||||
file: ./docker/Dockerfile
|
||||
context: .
|
||||
build-contexts: |
|
||||
packages=dist
|
||||
push: false
|
||||
load: true
|
||||
tags: mealie:e2e
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
- name: Deploy E2E Test Environment
|
||||
run: docker compose up -d
|
||||
working-directory: ./tests/e2e/docker
|
||||
- name: Install dependencies
|
||||
run: pnpm install
|
||||
- name: Install Playwright Browsers
|
||||
run: pnpm playwright install --with-deps
|
||||
- name: Check test environment
|
||||
run: docker ps
|
||||
- name: Run Playwright tests
|
||||
run: pnpm playwright test
|
||||
- name: Destroy Test Environment
|
||||
if: always()
|
||||
run: docker compose down --volumes
|
||||
working-directory: ./tests/e2e/docker
|
||||
@@ -17,37 +17,35 @@ jobs:
|
||||
with:
|
||||
ref: ${{ inputs.ref || github.sha }}
|
||||
|
||||
# Work around pnpm/action-setup v6 resolving the wrong version from package.json
|
||||
# https://github.com/pnpm/action-setup/issues/227
|
||||
- name: Read pnpm version
|
||||
id: pnpm-version
|
||||
run: 'echo "version=$(jq --raw-output ''.packageManager | split("@")[1]'' package.json)" >> "$GITHUB_OUTPUT"'
|
||||
working-directory: "frontend"
|
||||
- uses: pnpm/action-setup@v6
|
||||
with:
|
||||
version: ${{ steps.pnpm-version.outputs.version }}
|
||||
|
||||
- name: Setup node env 🏗
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
check-latest: true
|
||||
|
||||
- name: Get yarn cache directory path 🛠
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache node_modules 📦
|
||||
uses: actions/cache@v5
|
||||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
|
||||
with:
|
||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-yarn-
|
||||
node-version: 24
|
||||
cache: "pnpm"
|
||||
cache-dependency-path: "**/pnpm-lock.yaml"
|
||||
|
||||
- name: Install dependencies 👨🏻💻
|
||||
run: yarn
|
||||
run: pnpm install --prefer-offline
|
||||
working-directory: "frontend"
|
||||
|
||||
- name: Prepare nuxt 🚀
|
||||
run: yarn nuxt prepare
|
||||
run: pnpm nuxt prepare
|
||||
working-directory: "frontend"
|
||||
|
||||
- name: Run linter 👀
|
||||
run: yarn lint --max-warnings=0
|
||||
run: pnpm lint --max-warnings=0
|
||||
working-directory: "frontend"
|
||||
|
||||
- name: Run tests 🧪
|
||||
run: yarn test:ci
|
||||
run: pnpm test:ci
|
||||
working-directory: "frontend"
|
||||
Reference in new issue
Block a user