Skip to content

Commit

Permalink
merged develop
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbhayel committed Nov 14, 2024
2 parents f39d57d + 9056e59 commit 7eb9281
Show file tree
Hide file tree
Showing 14 changed files with 23,228 additions and 73 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ libraries/**
coverage/**
assets/build/**
tests/**
modules/legacy/assets/**
8 changes: 2 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,14 @@ jobs:
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # 2.27.1
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
env:
fail-fast: 'true'

- name: OAuth Composer Authentication
run:
composer config -g github-oauth.github.com ${{ secrets.DEVOPS_TOKEN }}

- name: Install Composer dependencies cache
uses: ramsey/composer-install@v2
uses: ramsey/composer-install@v3

- name: Install Composer dependencies
run:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/js-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
node-version: [18.x]

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

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/php-coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # 2.27.1
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
Expand All @@ -39,11 +39,8 @@ jobs:
phpcs -i
composer --version
- name: Oauth Composer authentication
run: composer config -g github-oauth.github.com ${{ secrets.DEVOPS_TOKEN }}

- name: Install dependencies
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # 2.2.0
uses: ramsey/composer-install@v3

- name: Add error matcher
run: echo "::add-matcher::$(pwd)/.github/checkstyle-problem-matcher.json"
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
MYSQL_DATABASE: wordpress_test
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Matrix variables
id: matrix
Expand All @@ -76,7 +76,7 @@ jobs:
fi
- name: Set up PHP
uses: shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0 # 2.27.1
uses: shivammathur/setup-php@v2
with:
coverage: ${{ steps.coverage.outputs.coverage }}
ini-values: ${{ steps.coverage.outputs.ini }}
Expand All @@ -89,12 +89,8 @@ jobs:
wget -q -O /usr/local/bin/phpunit "https://phar.phpunit.de/phpunit-${{ matrix.phpunit }}.phar"
chmod +x /usr/local/bin/phpunit
- name: Oauth Composer authentication
run:
composer config -g github-oauth.github.com ${{ secrets.DEVOPS_TOKEN }}

- name: Install dependencies
uses: ramsey/composer-install@83af392bf5f031813d25e6fe4cd626cdba9a2df6 # 2.2.0
uses: ramsey/composer-install@v3

#- name: Install Node.js
# uses: actions/setup-node@v2
Expand All @@ -108,7 +104,7 @@ jobs:
# run: npm run build

- name: Set up WordPress and WordPress Test Library
uses: sjinks/setup-wordpress-test-library@dd7f8144e892b042e034d713b734f7a19446abe1 # 2.0.1
uses: sjinks/setup-wordpress-test-library@master
with:
version: ${{ matrix.wp }}

Expand Down Expand Up @@ -137,10 +133,3 @@ jobs:
OPTIONS="$OPTIONS --coverage-clover=clover.xml"
fi
phpunit --order-by=random ${OPTIONS}
- name: Upload coverage report
uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # v3.1.4
with:
files: clover.xml
flags: unittests
if: ${{ steps.coverage.outputs.coverage != 'none' }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ vendor/
composer.lock
npm-debug.log
.DS_Store
package-lock.json
bin/.env
*/node_modules
!assets/dev/*
Expand Down
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
npm run lint:js
4 changes: 0 additions & 4 deletions modules/settings/assets/js/admin.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
import { ThemeProvider } from '@elementor/ui/styles';
import { StrictMode, Fragment, createRoot } from '@wordpress/element';
import App from './app';
import AdminTopBar from './components/admin-top-bar';
import { PluginSettingsProvider } from './contexts/plugin-settings';
import { SettingsProvider, NotificationsProvider } from './hooks';

const rootNode = document.getElementById( 'ea11y-app' );
const topBarNode = document.getElementById( 'ea11y-app-top-bar' );

// Can't use the settings hook in the global scope so accessing directly
const isDevelopment = window?.ea11ySettingsData?.isDevelopment;
const AppWrapper = Boolean( isDevelopment ) ? StrictMode : Fragment;

const root = createRoot( rootNode );
const topBar = createRoot( topBarNode );

root.render(
<AppWrapper>
Expand Down
Loading

0 comments on commit 7eb9281

Please sign in to comment.