Merge pull request #20 from Travelopia/fix/EX-1142-null-offset-access… #75
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coding Standards and Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
coverage: none | |
tools: composer, cs2pr | |
- name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '18.x' | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Composer cache | |
id: composer-cache | |
uses: actions/cache@v4 | |
with: | |
path: vendor | |
key: composer-${{ hashFiles( 'composer.lock' ) }}-${{ hashFiles( '.github/workflows/tests.yml' ) }} | |
- name: NodeJS cache | |
id: node-cache | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-${{ hashFiles( 'package-lock.json' ) }}-${{ hashFiles( '.github/workflows/tests.yml' ) }} | |
- name: Install Composer dependencies | |
if: steps.composer-cache.outputs.cache-hit != 'true' | |
run: composer install | |
- name: Install NodeJS dependencies | |
if: steps.node-cache.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: PHP Coding standards | |
run: npm run lint:php | |
- name: JS Coding standards | |
run: npm run lint:js | |
- name: CSS Coding standards | |
run: npm run lint:css | |
- name: PHP Static Analysis | |
run: npm run static-analysis:php |