Skip to content

Commit 8255fd9

Browse files
chore: update Github Actions versions (#4381)
1 parent aa2d541 commit 8255fd9

11 files changed

+67
-192
lines changed

.github/workflows/create-tag.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,10 @@ jobs:
1616
with:
1717
persist-credentials: false
1818
- name: Build files using ${{ matrix.node-version }}
19-
uses: actions/setup-node@v1
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version: ${{ matrix.node-version }}
22-
- name: Get yarn cache directory path
23-
id: yarn-cache-dir-path
24-
run: echo "::set-output name=dir::$(yarn cache dir)"
25-
- uses: actions/cache@v2
26-
id: yarn-cache
27-
with:
28-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
29-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30-
restore-keys: |
31-
${{ runner.os }}-yarn-
22+
cache: "yarn"
3223
- name: Release new version
3324
id: release
3425
run: |

.github/workflows/deploy-npm-package.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
node-version: [16.x]
1616
steps:
1717
- name: Checkout 🛎️
18-
uses: actions/checkout@v2.3.1
18+
uses: actions/checkout@4
1919
with:
2020
persist-credentials: false
2121
- name: Setup node ${{ matrix.node-version }} 🔧
22-
uses: actions/setup-node@v1
22+
uses: actions/setup-node@v4
2323
with:
2424
node-version: ${{ matrix.node-version }}
2525
registry-url: https://registry.npmjs.org/

.github/workflows/deploy-storybook.yml

+3-12
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,14 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout 🛎️
12-
uses: actions/checkout@v2.3.1
12+
uses: actions/checkout@v4
1313
with:
1414
persist-credentials: false
1515
- name: Setup node 16
16-
uses: actions/setup-node@v1
16+
uses: actions/setup-node@v4
1717
with:
1818
node-version: 16.x
19-
- name: Get yarn cache directory path
20-
id: yarn-cache-dir-path
21-
run: echo "::set-output name=dir::$(yarn cache dir)"
22-
- uses: actions/cache@v2
23-
id: yarn-cache
24-
with:
25-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
26-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27-
restore-keys: |
28-
${{ runner.os }}-yarn-
19+
cache: "yarn"
2920
- name: Install and Build 🔧
3021
run: |
3122
yarn install --frozen-lockfile

.github/workflows/deploy.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,10 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@master
1818
- name: Setup node 16
19-
uses: actions/setup-node@v1
19+
uses: actions/setup-node@v4
2020
with:
2121
node-version: 16.x
22-
- name: Get yarn cache directory path
23-
id: yarn-cache-dir-path
24-
run: echo "::set-output name=dir::$(yarn cache dir)"
25-
- uses: actions/cache@v2
26-
id: yarn-cache
27-
with:
28-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
29-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
30-
restore-keys: |
31-
${{ runner.os }}-yarn-
22+
cache: "yarn"
3223
- name: Build & create dist/artifact
3324
run: |
3425
yarn install --frozen-lockfile

.github/workflows/diff-translations.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout Ref Base
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1717
with:
1818
path: neve-head
1919
- name: Setup node 16
20-
uses: actions/setup-node@v1
20+
uses: actions/setup-node@v4
2121
with:
2222
node-version: 16.x
2323
- name: FRESH Makepot BASE

.github/workflows/e2e-storybook.yml

+10-19
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ on:
44
pull_request:
55
types: [opened, synchronize, ready_for_review]
66
branches-ignore:
7-
- 'update_dependencies'
7+
- "update_dependencies"
88
paths:
9-
- '.storybook/**'
10-
- 'e2e-tests/**'
11-
- '.github/e2e-storybook.yml'
12-
- 'package.json'
13-
- 'stories/**'
9+
- ".storybook/**"
10+
- "e2e-tests/**"
11+
- ".github/e2e-storybook.yml"
12+
- "package.json"
13+
- "stories/**"
1414
concurrency:
1515
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.ref }}
1616
cancel-in-progress: true
@@ -24,24 +24,15 @@ jobs:
2424
runs-on: ubuntu-latest
2525
steps:
2626
- name: Checkout 🛎️
27-
uses: actions/checkout@v2
27+
uses: actions/checkout@v4
2828
- name: Setup node 16
29-
uses: actions/setup-node@v1
29+
uses: actions/setup-node@v4
3030
with:
3131
node-version: 16.x
32-
- name: Get yarn cache directory path
33-
id: yarn-cache-dir-path
34-
run: echo "::set-output name=dir::$(yarn cache dir)"
35-
- uses: actions/cache@v2
36-
id: yarn-cache
37-
with:
38-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
39-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
40-
restore-keys: |
41-
${{ runner.os }}-yarn-
32+
cache: "yarn"
4233
- name: Build Cypress
4334
working-directory: ./e2e-tests
44-
run: yarn install --frozen-lockfile
35+
run: yarn install --frozen-lockfile
4536
- name: Start Storybook
4637
run: |
4738
yarn install --frozen-lockfile

.github/workflows/playwright.yml

+6-22
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,15 @@ jobs:
1919
git-sha-8: ${{ steps.retrieve-git-sha-8.outputs.sha8 }}
2020
steps:
2121
- name: Check out source files
22-
uses: actions/checkout@v2
22+
uses: actions/checkout@v4
2323
- name: Setup node 16
24-
uses: actions/setup-node@v1
24+
uses: actions/setup-node@v4
2525
with:
2626
node-version: 16.x
27+
cache: "yarn"
2728
- name: Get yarn cache directory path
2829
id: yarn-cache-dir-path
2930
run: echo "::set-output name=dir::$(yarn cache dir)"
30-
- uses: actions/cache@v3
31-
id: yarn-cache
32-
with:
33-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
34-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
35-
restore-keys: |
36-
${{ runner.os }}-yarn-
37-
- name: Get Composer Cache Directory
38-
id: composer-cache
39-
run: |
40-
echo "::set-output name=dir::$(composer config cache-files-dir)"
41-
- name: Configure Composer cache
42-
uses: actions/cache@v3
43-
with:
44-
path: ${{ steps.composer-cache.outputs.dir }}
45-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
46-
restore-keys: |
47-
${{ runner.os }}-composer-
4831
- name: Install composer deps
4932
run: composer install --no-dev --prefer-dist --no-progress --no-suggest
5033
- name: Install yarn deps
@@ -149,11 +132,12 @@ jobs:
149132
env:
150133
ZIP_URL: "https://verti-artifacts.s3.amazonaws.com/${{ github.event.pull_request.base.repo.name }}-${{ needs.dev-zip.outputs.branch-name }}-${{ needs.dev-zip.outputs.git-sha-8 }}/neve.zip"
151134
steps:
152-
- uses: actions/checkout@v3
135+
- uses: actions/checkout@v4
153136
- name: Setup node 16
154-
uses: actions/setup-node@v3
137+
uses: actions/setup-node@v4
155138
with:
156139
node-version: 16
140+
cache: "yarn"
157141
- name: Install ${{ matrix.envs }} env for ${{ matrix.specs }} specs
158142
run: bash ./bin/envs/init.sh ${{ matrix.envs }} latest no "$ZIP_URL"
159143
- name: Install dependencies

.github/workflows/sync-qa.yml

+2-11
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,10 @@ jobs:
2323
steps:
2424
- uses: actions/checkout@master
2525
- name: Setup node 16
26-
uses: actions/setup-node@v1
26+
uses: actions/setup-node@v4
2727
with:
2828
node-version: 16.x
29-
- name: Get yarn cache directory path
30-
id: yarn-cache-dir-path
31-
run: echo "::set-output name=dir::$(yarn cache dir)"
32-
- uses: actions/cache@v2
33-
id: yarn-cache
34-
with:
35-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
36-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
37-
restore-keys: |
38-
${{ runner.os }}-yarn-
29+
cache: "yarn"
3930
- name: Build dist
4031
run: |
4132
composer install --no-dev --prefer-dist --no-progress --no-suggest

.github/workflows/test-npm.yml

+3-12
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,12 @@ jobs:
1818
node-version: [16.x]
1919
steps:
2020
- name: Checkout source code
21-
uses: actions/checkout@v2
21+
uses: actions/checkout@v4
2222
- name: Setup node
23-
uses: actions/setup-node@v1
23+
uses: actions/setup-node@v4
2424
with:
2525
node-version: ${{ matrix.node-version }}
26-
- name: Get yarn cache directory path
27-
id: yarn-cache-dir-path
28-
run: echo "::set-output name=dir::$(yarn cache dir)"
29-
- uses: actions/cache@v2
30-
id: yarn-cache
31-
with:
32-
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
33-
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
34-
restore-keys: |
35-
${{ runner.os }}-yarn-
26+
cache: "yarn"
3627
- name: Install Dependencies
3728
env:
3829
CYPRESS_INSTALL_BINARY: 0

.github/workflows/test-php.yml

+32-74
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: PHP Tests
33
on:
44
push:
55
branches-ignore:
6-
- 'master'
6+
- "master"
77
env:
88
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
99
CYPRESS_INSTALL_BINARY: 0
@@ -18,80 +18,49 @@ jobs:
1818
- name: Setup PHP version
1919
uses: shivammathur/setup-php@v2
2020
with:
21-
php-version: '7.4'
21+
php-version: "7.4"
2222
extensions: simplexml
2323
tools: composer:v2.1
2424
- name: Checkout source code
25-
uses: actions/checkout@v2
26-
- name: Get Composer Cache Directory
27-
id: composer-cache
28-
run: |
29-
echo "::set-output name=dir::$(composer config cache-files-dir)"
30-
- name: Setup Composer cache
31-
uses: actions/cache@v1
32-
with:
33-
path: ${{ steps.composer-cache.outputs.dir }}
34-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
35-
restore-keys: |
36-
${{ runner.os }}-composer-
25+
uses: actions/checkout@v4
3726
- name: Install composer
3827
run: COMPOSER=composer-dev.json composer install --prefer-dist --no-progress --no-suggest
3928
- name: Run PHPCS
4029
run: composer run lint
4130

4231
phpunit:
43-
name: PHPUnit
44-
runs-on: ubuntu-22.04
45-
services:
46-
mysql:
47-
image: mysql:5.7
48-
env:
49-
MYSQL_ROOT_PASSWORD: root
50-
ports:
51-
- 3306/tcp
52-
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
53-
steps:
54-
- name: Setup PHP version
55-
uses: shivammathur/setup-php@v2
56-
with:
57-
php-version: '7.4'
58-
extensions: simplexml, mysql
59-
tools: phpunit-polyfills
60-
- name: Checkout source code
61-
uses: actions/checkout@v2
62-
- name: Install WordPress Test Suite
63-
run: |
64-
bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }}
65-
- name: Get Composer Cache Directory
66-
id: composer-cache
67-
run: |
68-
echo "::set-output name=dir::$(composer config cache-files-dir)"
69-
- name: Setup Composer cache
70-
uses: actions/cache@v1
71-
with:
72-
path: ${{ steps.composer-cache.outputs.dir }}
73-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
74-
restore-keys: |
75-
${{ runner.os }}-composer-
76-
- name: Install composer
77-
run: COMPOSER=composer-dev.json composer install --prefer-dist --no-progress --no-suggest --no-dev
78-
- name: Run phpunit
79-
run: phpunit
80-
32+
name: PHPUnit
33+
runs-on: ubuntu-22.04
34+
services:
35+
mysql:
36+
image: mysql:5.7
37+
env:
38+
MYSQL_ROOT_PASSWORD: root
39+
ports:
40+
- 3306/tcp
41+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
42+
steps:
43+
- name: Setup PHP version
44+
uses: shivammathur/setup-php@v2
45+
with:
46+
php-version: "7.4"
47+
extensions: simplexml, mysql
48+
tools: phpunit-polyfills
49+
- name: Checkout source code
50+
uses: actions/checkout@v4
51+
- name: Install WordPress Test Suite
52+
run: |
53+
bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1:${{ job.services.mysql.ports['3306'] }}
54+
- name: Install composer
55+
run: COMPOSER=composer-dev.json composer install --prefer-dist --no-progress --no-suggest --no-dev
56+
- name: Run phpunit
57+
run: phpunit
8158

8259
themecheck:
8360
name: Theme Check
8461
runs-on: ubuntu-latest
8562
steps:
86-
- uses: actions/checkout@v2
87-
- name: Get Composer Cache Directory
88-
id: composer-cache
89-
run: |
90-
echo "::set-output name=dir::$(composer config cache-files-dir)"
91-
- uses: actions/cache@v1
92-
with:
93-
path: ${{ steps.composer-cache.outputs.dir }}
94-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
63+
- uses: actions/checkout@v4
9564
- run: ./bin/envs/init.sh theme-check latest yes
9665
phpstan:
9766
name: PHPStan
@@ -100,21 +69,10 @@ jobs:
10069
- name: Setup PHP version
10170
uses: shivammathur/setup-php@v2
10271
with:
103-
php-version: '7.4'
72+
php-version: "7.4"
10473
extensions: simplexml, mysql
10574
- name: Checkout source code
106-
uses: actions/checkout@v2
107-
- name: Get Composer Cache Directory
108-
id: composer-cache
109-
run: |
110-
echo "::set-output name=dir::$(composer config cache-files-dir)"
111-
- name: Setup Composer cache
112-
uses: actions/cache@v1
113-
with:
114-
path: ${{ steps.composer-cache.outputs.dir }}
115-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
116-
restore-keys: |
117-
${{ runner.os }}-composer-
75+
uses: actions/checkout@v4
11876
- name: Install composer
11977
run: COMPOSER=composer-dev.json composer install
12078
- name: PHPStan Static Analysis

0 commit comments

Comments
 (0)