Skip to content

Commit

Permalink
Merge pull request #679 from brainstormforce/ci-matrix
Browse files Browse the repository at this point in the history
Using matrix array for selecting php and node version in CI run
  • Loading branch information
patilvikasj authored May 11, 2023
2 parents 26da1d0 + 287fb4a commit 5849308
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,37 @@ on: pull_request
jobs:
CI:
runs-on: ubuntu-latest

strategy:
matrix:
node: [ 14.15 ]
php: ['7.4']

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: ${{ matrix.php }}
coverage: none
tools: composer

- name: Use desired version of NodeJS
uses: actions/setup-node@v3
with:
node-version: 14.15
cache: 'npm'

- name: Composer Install
uses: ramsey/composer-install@v1

- name: Install composer dependencies
run: composer config github-oauth.github.com ${{ secrets.PRIVATE_ACCESS_TOKEN }} && composer install --prefer-dist --no-suggest --no-progress

- name: PHPCS check
if: always()
uses: chekalsky/phpcs-action@v1
with:
phpcs_bin_path: './vendor/bin/phpcs'

- name: Use desired version of NodeJS
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: 'npm'

- name: npm install, build
run: npm ci
Expand Down
7 changes: 7 additions & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
<rule ref="Generic.Arrays.DisallowLongArraySyntax.Found">
<type>warning</type>
</rule>

<!-- Setting textdomain. -->
<config name="text_domain" value="header-footer-elementor"/>
<!-- Setting prefix. -->
<config name="prefixes" value=""/>
<!-- WP version. -->
<config name="minimum_supported_wp_version" value="5.2"/>

<!-- Check all PHP files in directory tree by default. -->
<arg name="extensions" value="php"/>
Expand Down

0 comments on commit 5849308

Please sign in to comment.