Skip to content

Commit

Permalink
Update dependencies + fix broken PHPUnit workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rebeccahum committed May 9, 2024
1 parent 445401e commit 5c91c11
Show file tree
Hide file tree
Showing 13 changed files with 4,280 additions and 1,259 deletions.
34 changes: 18 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,63 +3,64 @@ name: Linting
env:
COMPOSER_VERSION: "2"
COMPOSER_CACHE: "${{ github.workspace }}/.composer-cache"
NODE_VERSION: "12"
NODE_VERSION: "18"
NODE_CACHE: "${{ github.workspace }}/node_modules_cache"

on:
push:
branches:
- develop
- master
- trunk
pull_request:
branches:
- develop
- '[0-9].[0-9x]*' # Version branches: 4.x.x, 4.1.x, 5.x

jobs:
eslint:
name: eslint
es_css_lint:
name: ES and Style Lint
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set standard 10up cache directories
run: |
sudo npm config set cache "${{ env.NODE_CACHE }}" --global
- name: Prepare npm cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.NODE_CACHE }}
key: npm-${{ env.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
npm-${{ env.NODE_VERSION }}-
- name: "install node v${{ env.NODE_VERSION }}"
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}

- name: npm install
run: npm install
- name: npm ci
run: npm ci

- name: eslint
- name: es lint
run: npm run lint-js

phpcs:
name: phpcs
name: PHP Lint
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set standard 10up cache directories
run: |
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}"
- name: Prepare composer cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE }}
key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }}
Expand All @@ -69,12 +70,13 @@ jobs:
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
php-version: '8.2'
extensions: :php-psr
tools: cs2pr
coverage: none
tools: composer:v1

- name: composer install
run: composer install

- name: PHPCS check
run: composer run lint
run: composer run lint
30 changes: 0 additions & 30 deletions .github/workflows/no-response.yml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/php-compatibility.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/push-asset-readme-update.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/push-deploy.yml

This file was deleted.

86 changes: 2 additions & 84 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Test

env:
COMPOSER_VERSION: "1"
COMPOSER_VERSION: "2"
COMPOSER_CACHE: "${{ github.workspace }}/.composer-cache"

on:
Expand All @@ -14,88 +14,6 @@ on:
- develop

jobs:
wpa_local:
name: WP Acceptance - Local
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set standard 10up cache directories
run: |
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}"
- name: Prepare composer cache
uses: actions/cache@v2
with:
path: ${{ env.COMPOSER_CACHE }}
key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ env.COMPOSER_VERSION }}-
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: prestissimo, composer:v1
ini-values: memory_limit=3G

- name: Install dependencies
run: composer install

- name: Test Local
run: ./run-wpacceptance.sh -l --attempts=3

- name: Upload error screenshots
uses: actions/upload-artifact@v2
if: failure()
with:
name: wpa-screenshots
path: screenshots/*.jpg

wpa_epio:
name: WP Acceptance - ElasticPress.io
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set standard 10up cache directories
run: |
composer config -g cache-dir "${{ env.COMPOSER_CACHE }}"
- name: Prepare composer cache
uses: actions/cache@v2
with:
path: ${{ env.COMPOSER_CACHE }}
key: composer-${{ env.COMPOSER_VERSION }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
composer-${{ env.COMPOSER_VERSION }}-
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
tools: prestissimo, composer:v1
ini-values: memory_limit=3G

- name: Install dependencies
run: composer install

- name: Test EP.io
run: ./run-wpacceptance.sh --ep-host=${{ secrets.EPIO_HOST }} --es-shield='${{ secrets.EPIO_SHIELD }}' --ep-index-prefix=${{ secrets.EPIO_INDEX_PREFIX }} --attempts=3

- name: Upload error screenshots
uses: actions/upload-artifact@v2
if: failure()
with:
name: wpa-screenshots
path: screenshots/*.jpg

phpunit:
name: PHP Unit
runs-on: ubuntu-latest
Expand Down Expand Up @@ -134,7 +52,7 @@ jobs:
- name: Set PHP version
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: '8.2'
coverage: none
tools: composer:v1

Expand Down
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/vendor/
/vendor-prefixed/
node_modules
/dist
.idea
.history
docs-built
Expand All @@ -9,5 +11,4 @@ test-coverage-html/
screenshots
.DS_Store

/tests/wpa/test-mu-plugins/custom-ep-credentials.php
wpa-elasticsearch.yml
elasticpress.zip
Loading

0 comments on commit 5c91c11

Please sign in to comment.