tests.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. - name: Setup PHPunit
  29. run: composer install -n
  30. - name: Run unit tests
  31. run: phpunit --no-coverage
  32. working-directory: tst
  33. Mocha:
  34. runs-on: ubuntu-latest
  35. steps:
  36. - name: Checkout
  37. uses: actions/checkout@v2
  38. - name: Setup Node
  39. uses: actions/setup-node@v1
  40. with:
  41. node-version: '12'
  42. - name: Setup Mocha
  43. run: npm install -g mocha
  44. - name: Setup Node modules
  45. run: npm install
  46. working-directory: js
  47. - name: Run unit tests
  48. run: mocha
  49. working-directory: js