Skip to content

Commit

Permalink
Add node setup, npm run lint and test
Browse files Browse the repository at this point in the history
  • Loading branch information
ho-man-chan committed May 4, 2022
1 parent 3f7a426 commit 6e2d190
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/standards-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand All @@ -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

Expand Down

0 comments on commit 6e2d190

Please sign in to comment.