php.yml 674 B

1234567891011121314151617181920212223242526272829303132
  1. name: build
  2. on: [push, pull_request]
  3. jobs:
  4. build:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v1
  8. - name: Validate composer.json and composer.lock
  9. run: composer validate
  10. - name: Install dependencies
  11. run: composer install --prefer-dist --no-progress --no-suggest
  12. - name: Run code sniffer
  13. run: vendor/bin/phpcs
  14. - name: Run test suite
  15. run: vendor/bin/phpunit --coverage-clover=coverage.xml
  16. env:
  17. XDEBUG_MODE: coverage
  18. UCLOUD_PUBLIC_KEY: foo
  19. UCLOUD_PRIVATE_KEY: bar
  20. UCLOUD_PROJECT_ID: oas
  21. - uses: codecov/codecov-action@v1
  22. with:
  23. file: ./coverage.xml