phpunit-oci.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. name: PHPUnit oci
  2. on:
  3. pull_request:
  4. permissions:
  5. contents: read
  6. concurrency:
  7. group: phpunit-oci-${{ github.head_ref || github.run_id }}
  8. cancel-in-progress: true
  9. jobs:
  10. changes:
  11. runs-on: ubuntu-latest
  12. outputs:
  13. src: ${{ steps.changes.outputs.src}}
  14. steps:
  15. - uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
  16. id: changes
  17. continue-on-error: true
  18. with:
  19. filters: |
  20. src:
  21. - '.github/workflows/**'
  22. - '3rdparty/**'
  23. - '**/lib/**'
  24. - '**/tests/**'
  25. - '**/vendor-bin/**'
  26. - '.php-cs-fixer.dist.php'
  27. - 'composer.json'
  28. - 'composer.lock'
  29. - '**.php'
  30. phpunit-oci:
  31. runs-on: ubuntu-20.04
  32. if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
  33. strategy:
  34. matrix:
  35. php-versions: ['8.0', '8.1', '8.2']
  36. services:
  37. oracle:
  38. image: ghcr.io/gvenzl/oracle-xe:11
  39. # Provide passwords and other environment variables to container
  40. env:
  41. ORACLE_RANDOM_PASSWORD: true
  42. APP_USER: autotest
  43. APP_USER_PASSWORD: owncloud
  44. # Forward Oracle port
  45. ports:
  46. - 1521:1521/tcp
  47. # Provide healthcheck script options for startup
  48. options: >-
  49. --health-cmd healthcheck.sh
  50. --health-interval 10s
  51. --health-timeout 5s
  52. --health-retries 10
  53. steps:
  54. - name: Checkout server
  55. uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
  56. with:
  57. submodules: true
  58. - name: Set up php ${{ matrix.php-versions }}
  59. uses: shivammathur/setup-php@c5fc0d8281aba02c7fda07d3a70cc5371548067d #v2.25.2
  60. with:
  61. php-version: ${{ matrix.php-versions }}
  62. extensions: ctype, curl, dom, fileinfo, gd, imagick, intl, json, mbstring, oci8, openssl, pcntl, pdo_sqlite, posix, sqlite, xml, zip
  63. coverage: none
  64. ini-file: development
  65. env:
  66. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  67. - name: Set up Nextcloud
  68. run: |
  69. composer install
  70. mkdir data
  71. ./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
  72. php -f index.php
  73. - name: PHPUnit
  74. run: composer run test:db
  75. - name: Run repair steps
  76. run: |
  77. ./occ maintenance:repair --include-expensive
  78. summary:
  79. permissions:
  80. contents: none
  81. runs-on: ubuntu-latest
  82. needs: [changes, phpunit-oci]
  83. if: always()
  84. name: phpunit-oci-summary
  85. steps:
  86. - name: Summary status
  87. run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-oci.result != 'success' }}; then exit 1; fi