oci.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. name: PHPUnit oci
  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: ['8.0', '8.1', '8.2']
  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@3df4ab11eba7bda6032a0b82a6bb43b11571feac
  35. with:
  36. submodules: true
  37. - name: Set up php ${{ matrix.php-versions }}
  38. uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
  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. coverage: none
  43. ini-file: development
  44. env:
  45. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  46. - name: Set up Nextcloud
  47. run: |
  48. composer install
  49. mkdir data
  50. ./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
  51. php -f index.php
  52. - name: PHPUnit
  53. run: composer run test:db
  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