Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit be5ce32

Browse files
Fix various GitHub Actions warnings (#7573)
* Remove git checkout HEAD^2 * Add assertion to Cross-Sells e2e test * Replace deprecated set-output calls * bot: update checkstyle.xml * Remove obsolete eslint-disable comment * Change “actions/cache@v2” to “actions/cache@v3” Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 3dc721b commit be5ce32

File tree

6 files changed

+15
-17
lines changed

6 files changed

+15
-17
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ jobs:
3636
# a pull request then we can checkout the head.
3737
fetch-depth: 2
3838

39-
# If this run was triggered by a pull request event, then checkout
40-
# the head of the pull request instead of the merge commit.
41-
- run: git checkout HEAD^2
42-
if: ${{ github.event_name == 'pull_request' }}
43-
4439
# Initializes the CodeQL tools for scanning.
4540
- name: Initialize CodeQL
4641
uses: github/codeql-action/init@v2

.github/workflows/php-coding-standards.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ jobs:
3030

3131
- name: Get Composer cache directory
3232
id: composer-cache
33-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
33+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
34+
3435

3536
- name: Set up Composer caching
36-
uses: actions/cache@v2
37+
uses: actions/cache@v3
3738
env:
3839
cache-name: cache-composer-dependencies
3940
with:

.github/workflows/php-js-e2e-tests.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ jobs:
4444
- name: Get Composer Cache Directory
4545
id: composer-cache
4646
run: |
47-
echo "::set-output name=dir::$(composer config cache-files-dir)"
48-
- uses: actions/cache@v2
47+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
48+
49+
- uses: actions/cache@v3
4950
with:
5051
path: ${{ steps.composer-cache.outputs.dir }}
5152
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -124,8 +125,8 @@ jobs:
124125
- name: Get Composer Cache Directory
125126
id: composer-cache
126127
run: |
127-
echo "::set-output name=dir::$(composer config cache-files-dir)"
128-
- uses: actions/cache@v2
128+
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
129+
- uses: actions/cache@v3
129130
with:
130131
path: ${{ steps.composer-cache.outputs.dir }}
131132
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

.github/workflows/typescript-monitoring.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
ref: ${{ github.event.pull_request.head.ref }}
1414

1515
- name: Cache node modules
16-
uses: actions/cache@v2
16+
uses: actions/cache@v3
1717
env:
1818
cache-name: cache-node-modules
1919
with:
@@ -51,7 +51,7 @@ jobs:
5151
- name: Check if the checklist.xml file is changed
5252
id: verify_diff
5353
run: |
54-
git diff --quiet checkstyle.xml || echo "::set-output name=is_different_checkstyle::true"
54+
git diff --quiet checkstyle.xml || echo "is_different_checkstyle=true" >> $GITHUB_OUTPUT
5555
5656
- name: Commit the new checklist.xml file
5757
if: steps.verify_diff.outputs.is_different_checkstyle == 'true'

.github/workflows/unit-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
- name: Get Composer Cache Directory
4444
id: composer-cache
4545
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
46-
- uses: actions/cache@v2
46+
- uses: actions/cache@v3
4747
with:
4848
path: ${{ steps.composer-cache.outputs.dir }}
4949
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -100,7 +100,7 @@ jobs:
100100
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
101101

102102
- name: Set up Composer caching
103-
uses: actions/cache@v2
103+
uses: actions/cache@v3
104104
env:
105105
cache-name: cache-composer-dependencies
106106
with:

tests/e2e/specs/shopper/cart-checkout/cart.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ describe( 'Shopper → Cart', () => {
105105
await shopper.block.productIsInCart( SIMPLE_VIRTUAL_PRODUCT_NAME, 4 );
106106
} );
107107

108-
// eslint-disable-next-line jest/expect-expect
109108
it( 'User can see Cross-Sells products block', async () => {
110109
await shopper.block.emptyCart();
111110
await shopper.block.goToShop();
@@ -119,7 +118,9 @@ describe( 'Shopper → Cart', () => {
119118
await page.waitForSelector(
120119
'.wp-block-woocommerce-cart-line-items-block tr:nth-child(2)'
121120
);
122-
await shopper.block.productIsInCart( '32GB USB Stick', 1 );
121+
await expect(
122+
shopper.block.productIsInCart( '32GB USB Stick', 1 )
123+
).toBeTruthy();
123124
} );
124125

125126
it( 'User can proceed to checkout', async () => {

0 commit comments

Comments
 (0)