oci.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. name: PHPUnit
  2. on: pull_request
  3. permissions:
  4. contents: read
  5. concurrency:
  6. group: phpunit-oci-${{ github.head_ref || github.run_id }}
  7. cancel-in-progress: true
  8. jobs:
  9. phpunit-oci:
  10. runs-on: ubuntu-20.04
  11. if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
  12. strategy:
  13. matrix:
  14. php-versions: [ '7.4', '8.0', '8.1']
  15. services:
  16. oracle:
  17. image: ghcr.io/gvenzl/oracle-xe:11
  18. # Provide passwords and other environment variables to container
  19. env:
  20. ORACLE_RANDOM_PASSWORD: true
  21. APP_USER: autotest
  22. APP_USER_PASSWORD: owncloud
  23. # Forward Oracle port
  24. ports:
  25. - 1521:1521/tcp
  26. # Provide healthcheck script options for startup
  27. options: >-
  28. --health-cmd healthcheck.sh
  29. --health-interval 10s
  30. --health-timeout 5s
  31. --health-retries 10
  32. steps:
  33. - name: Checkout server
  34. uses: actions/checkout@v3
  35. with:
  36. submodules: true
  37. - name: Set up php ${{ matrix.php-versions }}
  38. uses: shivammathur/setup-php@v2
  39. with:
  40. php-version: ${{ matrix.php-versions }}
  41. extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, oci8, openssl, pcntl, pdo_sqlite, posix, sqlite, xml, zip
  42. tools: phpunit:9
  43. coverage: none
  44. env:
  45. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  46. - name: Set up Nextcloud
  47. run: |
  48. mkdir data
  49. ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=1521 --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin
  50. php -f index.php
  51. - name: PHPUnit
  52. working-directory: tests
  53. run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
  54. - name: Run repair steps
  55. run: |
  56. ./occ maintenance:repair --include-expensive
  57. summary:
  58. permissions:
  59. contents: none
  60. runs-on: ubuntu-latest
  61. needs: phpunit-oci
  62. if: always()
  63. name: phpunit-oci-summary
  64. steps:
  65. - name: Summary status
  66. run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi