Skip to content

Commit

Permalink
Support Jest
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 authored Jan 9, 2024
1 parent 0ca3adc commit 1a99365
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,11 @@ jobs:
else
echo -e "\033[0;33mPHPUnit execution skipped.\033[0m"
fi
- name: "Jest"
run: |
if [[ -f "node_modules/.bin/jest" && -f "jest.config.js" ]]; then
echo -e "\033[0;33mExecuting Jest...\033[0m"
NODE_OPTIONS="--experimental-vm-modules" node_modules/.bin/jest --colors --forceExit
else
echo -e "\033[0;33mJest execution skipped.\033[0m"
fi
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ This workflow will execute the following actions as long as they are available o
| Stylelint | [stylelint](https://www.npmjs.com/package/stylelint) | `.stylelintrc.js` |
| Licence headers check | [glpi-project/tools](https://packagist.org/packages/glpi-project/tools) | `tools/HEADER` |
| PHPUnit | [phpunit/phpunit](https://packagist.org/packages/phpunit/phpunit) | `phpunit.xml` |
| Jest | [jest](https://www.npmjs.com/package/jest) | `jest.config.js` |

You can use this workflow in any plugin using the following Github Actions configuration.
You will have to use your plugin system name in the `plugin-key` parameter.
Expand Down

0 comments on commit 1a99365

Please sign in to comment.