oci.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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@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. ini-file: development
  45. env:
  46. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  47. - name: Set up Nextcloud
  48. run: |
  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. working-directory: tests
  54. run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
  55. - name: Run repair steps
  56. run: |
  57. ./occ maintenance:repair --include-expensive
  58. summary:
  59. permissions:
  60. contents: none
  61. runs-on: ubuntu-latest
  62. needs: phpunit-oci
  63. if: always()
  64. name: phpunit-oci-summary
  65. steps:
  66. - name: Summary status
  67. run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi