Geen omschrijving

test-ci.yml 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. name: PHP CI with Composer
  2. on:
  3. push:
  4. paths-ignore:
  5. - '**.md'
  6. jobs:
  7. build:
  8. strategy:
  9. fail-fast: false
  10. max-parallel: 1
  11. matrix:
  12. php-versions: ['5.4', '5.5', '5.6', '7.0']
  13. runs-on: ubuntu-latest
  14. steps:
  15. - name: Checkout
  16. uses: actions/checkout@v2
  17. - name: Setup php
  18. uses: shivammathur/setup-php@v2
  19. with:
  20. php-version: ${{ matrix.php-versions }}
  21. - name: Install dependencies
  22. run: |
  23. composer self-update
  24. composer install --no-interaction --prefer-source --dev
  25. - name: Run cases
  26. run: |
  27. ./vendor/bin/phpcs --standard=PSR2 src
  28. ./vendor/bin/phpcs --standard=PSR2 examples
  29. ./vendor/bin/phpcs --standard=PSR2 tests
  30. ./vendor/bin/phpunit --coverage-clover=coverage.xml
  31. env:
  32. QINIU_ACCESS_KEY: ${{ secrets.QINIU_ACCESS_KEY }}
  33. QINIU_SECRET_KEY: ${{ secrets.QINIU_SECRET_KEY }}
  34. QINIU_TEST_BUCKET: ${{ secrets.QINIU_TEST_BUCKET }}
  35. QINIU_TEST_DOMAIN: ${{ secrets.QINIU_TEST_DOMAIN }}
  36. - name: After_success
  37. run: bash <(curl -s https://codecov.io/bash)