Features #36
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: Javascript test suite | |
on: [pull_request] | |
jobs: | |
karma: | |
name: Karma tests | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.0' | |
coverage: none | |
extensions: gd,pdo,xml,json,mysqli,pdo_mysql,libxml,mbstring | |
- name: Install NodeJS | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 8 | |
- name: Code checkout | |
uses: actions/checkout@v3 | |
- name: Restore NPM cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: ${{ runner.os }}-node- | |
- name: Get Composer Cache Directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> ${GITHUB_OUTPUT} | |
- name: Restore Composer Cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Composer install | |
run: composer install | |
- name: Yarn install | |
run: yarn install | |
- name: Yarn check | |
continue-on-error: true | |
run: yarn check | |
- name: Run Karma tests | |
run: yarn test |