ci.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. name: HighVersion CI
  2. on:
  3. push:
  4. branches: [ master ]
  5. pull_request:
  6. branches: [ master ]
  7. jobs:
  8. build:
  9. runs-on: ubuntu-latest
  10. strategy:
  11. matrix:
  12. php-versions: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
  13. fail-fast: false
  14. steps:
  15. - name: Checkout
  16. uses: actions/checkout@v3
  17. - uses: actions/setup-node@v4
  18. with:
  19. node-version: 10.x
  20. - name: Install Proxy
  21. run: npm install o_o -g --registry=https://registry.npmmirror.com
  22. - name: Start Proxy
  23. run: o_o &
  24. - name: Setup PHP
  25. uses: shivammathur/setup-php@v2
  26. with:
  27. php-version: ${{ matrix.php-versions }}
  28. extensions: mbstring, intl
  29. ini-values: post_max_size=256M, max_execution_time=180
  30. coverage: xdebug
  31. tools: php-cs-fixer, phpunit
  32. - name: Validate composer.json and composer.lock
  33. run: composer validate
  34. - name: Install dependencies
  35. run: composer install --prefer-dist --no-progress --no-suggest
  36. - name: Run test case
  37. run: composer test
  38. env:
  39. REGION_ID: ${{ secrets.REGION_ID }}
  40. ACCESS_KEY_ID: ${{ secrets.ACCESS_KEY_ID }}
  41. ACCESS_KEY_SECRET: ${{ secrets.ACCESS_KEY_SECRET }}
  42. PRIVATE_KEY_LINE_1: ${{ secrets.PRIVATE_KEY_LINE_1 }}
  43. PUBLIC_KEY_ID: ${{ secrets.PUBLIC_KEY_ID }}
  44. IMAGE_SEARCH_ACCESS_KEY_ID: ${{ secrets.IMAGE_SEARCH_ACCESS_KEY_ID }}
  45. IMAGE_SEARCH_ACCESS_KEY_SECRET: ${{ secrets.IMAGE_SEARCH_ACCESS_KEY_SECRET }}
  46. IMAGE_SEARCH_INSTANCE_NAME: ${{ secrets.IMAGE_SEARCH_INSTANCE_NAME }}
  47. - name: CodeCov
  48. run: bash <(curl -s https://codecov.io/bash)