diff --git a/.github/workflows/standards-and-tests.yml b/.github/workflows/standards-and-tests.yml index 34f5e07..c283cd6 100644 --- a/.github/workflows/standards-and-tests.yml +++ b/.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