From 54b11ec61f85a830378f3b8a6c1ecc37d6adaacd Mon Sep 17 00:00:00 2001 From: Ghislain B Date: Fri, 10 Nov 2023 11:00:02 -0500 Subject: [PATCH 1/2] chore: change CI workflow to avoid caching issues - caching seems to be a problem, very often the PR looks good but issue were resurfacing after merging the PR and that seem to be a caching issue, hopefully this fixes it - use same config as Slickgrid-Universal project --- .github/workflows/main.yml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7fea88a23..6ceb1e55f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18] + node: [18, 20] steps: - name: Clone repository @@ -21,22 +21,27 @@ jobs: with: fetch-depth: 3 - - name: Use latest version of Node.js + - name: Set NodeJS uses: actions/setup-node@v4 with: - node-version: "*" + node-version: ${{ matrix.node }} + cache: 'pnpm' - - name: Cache pnpm modules - uses: actions/cache@v3 + - name: Get pnpm store directory + id: pnpm-cache + run: | + echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + name: Setup pnpm cache with: - path: ~/.pnpm-store - key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} + path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | - ${{ runner.os }}- - - uses: pnpm/action-setup@v2.4.0 - with: - version: 8 - run_install: true + ${{ runner.os }}-pnpm-store- + + - name: Run pnpm install dependencies + run: pnpm install - run: pnpm --version @@ -117,4 +122,4 @@ jobs: with: github_token: ${{ secrets.GITHUB_TOKEN }} destination_dir: playwright-report - publish_dir: ./playwright-report \ No newline at end of file + publish_dir: ./playwright-report From 3430b0930bec59dee2f5a7c2370a5d3b6415f792 Mon Sep 17 00:00:00 2001 From: Ghislain B Date: Fri, 10 Nov 2023 11:15:24 -0500 Subject: [PATCH 2/2] chore: use pnpm config from their docs --- .github/workflows/main.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6ceb1e55f..01813c8b2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,15 +27,21 @@ jobs: node-version: ${{ matrix.node }} cache: 'pnpm' + - uses: pnpm/action-setup@v2 + name: Install pnpm + with: + version: 8 + run_install: false + - name: Get pnpm store directory - id: pnpm-cache + shell: bash run: | - echo "pnpm_cache_dir=$(pnpm store path)" >> $GITHUB_OUTPUT + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - uses: actions/cache@v3 name: Setup pnpm cache with: - path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }} + path: ${{ env.STORE_PATH }} key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} restore-keys: | ${{ runner.os }}-pnpm-store-