From 45e7595737ad45eb89498db8dee2d3a74c1fb9ec Mon Sep 17 00:00:00 2001 From: Miroslav Mitev Date: Thu, 31 Oct 2024 18:13:29 +0200 Subject: [PATCH 1/2] Update Github artifact actions to v4 --- .github/workflows/build.yml | 6 +++--- .github/workflows/dependencies-report.yml | 4 ++-- .github/workflows/e2e.yml | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0e196b23c..0227ca4c4e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,6 @@ name: Plugin Build -on: +on: - pull_request - workflow_call @@ -29,7 +29,7 @@ jobs: - name: Decompress plugin run: unzip sensei-lms.zip -d sensei-lms - name: Store Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: sensei-lms-${{ github.event.pull_request.head.sha }} path: ${{ github.workspace }}/sensei-lms/ @@ -58,7 +58,7 @@ jobs: php: [7.4, 8.2] steps: - name: Download Build Artifact - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: sensei-lms-${{ github.event.pull_request.head.sha }} diff --git a/.github/workflows/dependencies-report.yml b/.github/workflows/dependencies-report.yml index a163e69ef8..15720eae54 100644 --- a/.github/workflows/dependencies-report.yml +++ b/.github/workflows/dependencies-report.yml @@ -44,7 +44,7 @@ jobs: run: npm run build:combine-assets if: steps.dist-cache.outputs.cache-hit != 'true' - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: combined-assets path: ${{ github.workspace }}/assets/dist @@ -69,7 +69,7 @@ jobs: - name: Build Combined Assets run: npm run build:combine-assets - name: Download assets (trunk) - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: combined-assets path: dist-trunk diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 39143fa671..2e571bd5c5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -29,7 +29,7 @@ jobs: with: path: node_modules/ key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }} - + - name: Install PHP dependencies uses: ./.github/actions/install-php @@ -44,7 +44,7 @@ jobs: run: npx playwright install --with-deps chromium - name: Start wp-env - run: npm run wp-env start + run: npm run wp-env start - name: Run Playwright tests with @setup annotation run: CI=true npm run test:e2e:setup-only @@ -53,7 +53,7 @@ jobs: run: CI=true npm run test:e2e - name: Archive report - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: failure() with: name: playwright-report From cf8e61655a688d144a8f1af0818aad50ec1ab44d Mon Sep 17 00:00:00 2001 From: Miroslav Mitev Date: Mon, 4 Nov 2024 15:46:10 +0200 Subject: [PATCH 2/2] Update `actions/checkout` and `actions/cache` to v4 --- .github/actions/install-php/action.yml | 2 +- .github/workflows/build-docs.yml | 2 +- .github/workflows/build.yml | 4 ++-- .github/workflows/changelogger.yml | 2 +- .github/workflows/dependencies-report.yml | 10 +++++----- .github/workflows/e2e.yml | 6 +++--- .github/workflows/gardening.yml | 4 ++-- .github/workflows/js.yml | 16 ++++++++-------- .github/workflows/php.yml | 12 ++++++------ .github/workflows/psalm.yml | 6 +++--- .github/workflows/release-checklist.yml | 2 +- .github/workflows/report-build.yml | 2 +- 12 files changed, 34 insertions(+), 34 deletions(-) diff --git a/.github/actions/install-php/action.yml b/.github/actions/install-php/action.yml index 5c800c9bd8..26267332d5 100644 --- a/.github/actions/install-php/action.yml +++ b/.github/actions/install-php/action.yml @@ -25,7 +25,7 @@ runs: id: composer-cache run: | echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ${{ steps.composer-cache.outputs.dir }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index db6887a996..ec4d38f5ff 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -7,7 +7,7 @@ jobs: hookdocs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: npm install, and build docs run: | npm ci diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0227ca4c4e..676310ef6d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,12 +9,12 @@ jobs: name: Plugin Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Get npm cache directory id: npm-cache run: | echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ${{ steps.npm-cache.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} diff --git a/.github/workflows/changelogger.yml b/.github/workflows/changelogger.yml index cee4232bdc..553566e1d6 100644 --- a/.github/workflows/changelogger.yml +++ b/.github/workflows/changelogger.yml @@ -17,7 +17,7 @@ jobs: name: Changelogger used runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/deepen-to-merge-base - uses: ./.github/actions/install-php - name: Check change files are touched for touched projects diff --git a/.github/workflows/dependencies-report.yml b/.github/workflows/dependencies-report.yml index 15720eae54..dfe5e8704b 100644 --- a/.github/workflows/dependencies-report.yml +++ b/.github/workflows/dependencies-report.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest name: Build trunk for Dependencies Report steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: trunk - shell: bash @@ -16,7 +16,7 @@ jobs: id: trunk-commit run: | echo "commit=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 id: dist-cache with: path: ${{ github.workspace }}/assets/dist @@ -27,7 +27,7 @@ jobs: if: steps.dist-cache.outputs.cache-hit != 'true' run: | echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 if: steps.dist-cache.outputs.cache-hit != 'true' with: path: ${{ steps.npm-cache.outputs.dir }} @@ -53,12 +53,12 @@ jobs: name: WordPress Dependencies Report runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Get npm cache directory id: npm-cache run: | echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ${{ steps.npm-cache.outputs.dir }} key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }} diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 2e571bd5c5..2aca6daac9 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -19,13 +19,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.npm/ key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: node_modules/ key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }} diff --git a/.github/workflows/gardening.yml b/.github/workflows/gardening.yml index 5fe4f3dfdb..92978795bd 100644 --- a/.github/workflows/gardening.yml +++ b/.github/workflows/gardening.yml @@ -14,12 +14,12 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Setup Node uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 22 - name: Wait for prior instances of the workflow to finish uses: softprops/turnstyle@v1 diff --git a/.github/workflows/js.yml b/.github/workflows/js.yml index 41ec78db03..829448a1c4 100644 --- a/.github/workflows/js.yml +++ b/.github/workflows/js.yml @@ -9,12 +9,12 @@ jobs: name: JS Linting runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: ~/.npm/ key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: node_modules/ key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }} @@ -29,12 +29,12 @@ jobs: name: TypeScript Checking runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: ~/.npm/ key: ${{ runner.os }}-npm-${{ hashFiles('package-lock.json') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: node_modules/ key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }} @@ -48,8 +48,8 @@ jobs: runs-on: ubuntu-latest steps: # clone the repository - - uses: actions/checkout@v3 - - uses: actions/cache@v3 + - uses: actions/checkout@v4 + - uses: actions/cache@v4 with: path: ~/.npm key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index cf8768247d..4ac795faab 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -10,16 +10,16 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Get cached composer directories - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/composer/ key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: vendor/ key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }} @@ -84,14 +84,14 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Get cached composer directories - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/composer/ key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: vendor/ key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }} diff --git a/.github/workflows/psalm.yml b/.github/workflows/psalm.yml index 27f31f34ae..20d12b9079 100644 --- a/.github/workflows/psalm.yml +++ b/.github/workflows/psalm.yml @@ -19,16 +19,16 @@ jobs: php: ['7.4', '8.2'] steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Get cached composer directories - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/composer/ key: ${{ runner.os }}-composer-${{ hashFiles('composer.lock') }} - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: vendor/ key: ${{ runner.os }}-vendor-${{ hashFiles('composer.lock') }} diff --git a/.github/workflows/release-checklist.yml b/.github/workflows/release-checklist.yml index 300f954deb..a78fc01105 100644 --- a/.github/workflows/release-checklist.yml +++ b/.github/workflows/release-checklist.yml @@ -14,7 +14,7 @@ jobs: name: Sensei release checklist steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4 - name: Checklist uses: automattic/contextual-qa-checklist-action@master with: diff --git a/.github/workflows/report-build.yml b/.github/workflows/report-build.yml index 2cc69600c2..b0f64b2240 100644 --- a/.github/workflows/report-build.yml +++ b/.github/workflows/report-build.yml @@ -11,7 +11,7 @@ jobs: name: Report Plugin Build runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Publish commit status with the link to download the plugin id: plugin_artifact uses: Automattic/github-action-report-artifact@v0