tests.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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-dev
  13. PHPunit:
  14. runs-on: ubuntu-latest
  15. strategy:
  16. matrix:
  17. php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4']
  18. name: PHP ${{ matrix.php-versions }} unit tests on ${{ matrix.operating-system }}
  19. steps:
  20. - name: Checkout
  21. uses: actions/checkout@v2
  22. - name: Setup PHP
  23. uses: shivammathur/setup-php@v2
  24. with:
  25. php-version: ${{ matrix.php-versions }}
  26. extensions: gd, sqlite3
  27. - name: Remove composer lock
  28. run: rm composer.lock
  29. - name: Setup PHPunit
  30. run: composer install -n
  31. - name: Install Google Cloud Storage
  32. run: composer require google/cloud-storage
  33. - name: Run unit tests
  34. run: ../vendor/bin/phpunit --no-coverage
  35. working-directory: tst
  36. Mocha:
  37. runs-on: ubuntu-latest
  38. steps:
  39. - name: Checkout
  40. uses: actions/checkout@v2
  41. - name: Setup Node
  42. uses: actions/setup-node@v1
  43. with:
  44. node-version: '12'
  45. - name: Setup Mocha
  46. run: npm install -g mocha
  47. - name: Setup Node modules
  48. run: npm install
  49. working-directory: js
  50. - name: Run unit tests
  51. run: mocha
  52. working-directory: js