Browse Source

Add node setup, npm run lint and test

Ho Man Chan 2 years ago
parent
commit
6e2d190d8c
  1. 19
      .github/workflows/standards-and-tests.yml

19
.github/workflows/standards-and-tests.yml

@ -32,6 +32,11 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Start required services
run: sudo systemctl start mysql.service
@ -41,6 +46,12 @@ jobs:
path: vendor
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}
- name: Setup PHP with Composer 2
uses: shivammathur/setup-php@v2
with:
@ -53,6 +64,14 @@ jobs:
export PATH="$HOME/.composer/vendor/bin:$PATH"
composer install --no-interaction
- name: Run Lint
run: npm run lint
if: matrix.experimental == false
- name: Run Frontend Tests
run: npm run test
if: matrix.experimental == false
- name: Run PHP CodeSniffer
run: composer standards

Loading…
Cancel
Save