tests.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: Tests
  2. on: [push]
  3. jobs:
  4. Composer:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - name: Checkout
  8. uses: actions/checkout@v2
  9. - name: Validate composer.json and composer.lock
  10. run: composer validate
  11. - name: Install dependencies
  12. run: composer install --prefer-dist --no-progress --no-suggest
  13. PHPunit:
  14. runs-on: ${{ matrix.operating-system }}
  15. strategy:
  16. matrix:
  17. operating-system: [ubuntu-latest, windows-latest, macos-latest]
  18. php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
  19. name: PHP ${{ matrix.php-versions }} unit tests on ${{ matrix.operating-system }}
  20. steps:
  21. - name: Checkout
  22. uses: actions/checkout@v2
  23. - name: Setup PHP
  24. uses: shivammathur/setup-php@v2
  25. with:
  26. php-version: ${{ matrix.php-versions }}
  27. extensions: gd, sqlite3
  28. tools: phpunit
  29. - name: Run unit tests
  30. run: phpunit --no-coverage
  31. working-directory: tst
  32. Mocha:
  33. runs-on: ubuntu-latest
  34. steps:
  35. - name: Checkout
  36. uses: actions/checkout@v2
  37. - name: Setup Node
  38. uses: actions/setup-node@v1
  39. with:
  40. node-version: '12'
  41. - name: Setup Mocha
  42. run: npm install -g mocha
  43. - name: Setup Node modules
  44. run: npm install
  45. working-directory: js
  46. - name: Run unit tests
  47. run: mocha
  48. working-directory: js