From 9988c5020b9d0ab13a58858d26327f4b40c04429 Mon Sep 17 00:00:00 2001 From: Bernhard Kirchen Date: Fri, 20 Sep 2024 17:07:14 +0200 Subject: [PATCH] webapp: enable corepack to use fixed version of yarn --- .github/workflows/build.yml | 13 +++++++++++-- .github/workflows/yarnlint.yml | 10 ++++++++-- .github/workflows/yarnprettier.yml | 10 ++++++++-- webapp/package.json | 3 ++- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4879fa055..15224b1eb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,6 +93,11 @@ jobs: python -m pip install --upgrade pip pip install --upgrade platformio setuptools + - name: Enable Corepack + run: | + cd webapp + corepack enable + - name: Setup Node.js and yarn uses: actions/setup-node@v4 with: @@ -101,10 +106,14 @@ jobs: cache-dependency-path: "webapp/yarn.lock" - name: Install WebApp dependencies - run: yarn --cwd webapp install --frozen-lockfile + run: | + cd webapp + yarn install --frozen-lockfile - name: Build WebApp - run: yarn --cwd webapp build + run: | + cd webapp + yarn build - name: Build firmware run: pio run -e ${{ matrix.environment }} diff --git a/.github/workflows/yarnlint.yml b/.github/workflows/yarnlint.yml index 2522410a9..8bb23a5fb 100644 --- a/.github/workflows/yarnlint.yml +++ b/.github/workflows/yarnlint.yml @@ -6,8 +6,14 @@ jobs: build: runs-on: ubuntu-latest + defaults: + run: + working-directory: webapp + steps: - uses: actions/checkout@v4 + - name: Enable Corepack + run: corepack enable - name: Setup Node.js and yarn uses: actions/setup-node@v4 with: @@ -16,7 +22,7 @@ jobs: cache-dependency-path: "webapp/yarn.lock" - name: Install WebApp dependencies - run: yarn --cwd webapp install --frozen-lockfile + run: yarn install --frozen-lockfile - name: Linting - run: yarn --cwd webapp lint \ No newline at end of file + run: yarn lint diff --git a/.github/workflows/yarnprettier.yml b/.github/workflows/yarnprettier.yml index 1727eea3c..ebb017346 100644 --- a/.github/workflows/yarnprettier.yml +++ b/.github/workflows/yarnprettier.yml @@ -6,8 +6,14 @@ jobs: build: runs-on: ubuntu-latest + defaults: + run: + working-directory: webapp + steps: - uses: actions/checkout@v4 + - name: Enable Corepack + run: corepack enable - name: Setup Node.js and yarn uses: actions/setup-node@v4 with: @@ -16,7 +22,7 @@ jobs: cache-dependency-path: "webapp/yarn.lock" - name: Install WebApp dependencies - run: yarn --cwd webapp install --frozen-lockfile + run: yarn install --frozen-lockfile - name: Check Formatting - run: yarn --cwd webapp prettier --check src/ + run: yarn prettier --check src/ diff --git a/webapp/package.json b/webapp/package.json index a427ce2c7..6c1572a7a 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -46,5 +46,6 @@ "vite-plugin-compression": "^0.5.1", "vite-plugin-css-injected-by-js": "^3.5.1", "vue-tsc": "^2.0.29" - } + }, + "packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e" }