From 6e2d190d8cbef023f0fd12c20e448be315a3f34b Mon Sep 17 00:00:00 2001 From: Ho Man Chan Date: Tue, 3 May 2022 22:26:27 -0400 Subject: [PATCH] Add node setup, npm run lint and test --- .github/workflows/standards-and-tests.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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