oci.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. name: PHPUnit
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - master
  7. - stable*
  8. jobs:
  9. phpunit-oci:
  10. runs-on: ubuntu-20.04
  11. if: ${{ github.repository_owner != 'nextcloud-gmbh' }}
  12. strategy:
  13. fail-fast: false
  14. matrix:
  15. php-versions: [ '7.4', '8.0', '8.1']
  16. databases: [ 'oci' ]
  17. name: php${{ matrix.php-versions }}-${{ matrix.databases }}
  18. services:
  19. oracle:
  20. image: ghcr.io/gvenzl/oracle-xe:11
  21. # Provide passwords and other environment variables to container
  22. env:
  23. ORACLE_RANDOM_PASSWORD: true
  24. APP_USER: autotest
  25. APP_USER_PASSWORD: owncloud
  26. # Forward Oracle port
  27. ports:
  28. - 1521:1521/tcp
  29. # Provide healthcheck script options for startup
  30. options: >-
  31. --health-cmd healthcheck.sh
  32. --health-interval 10s
  33. --health-timeout 5s
  34. --health-retries 10
  35. steps:
  36. - name: Checkout server
  37. uses: actions/checkout@v2
  38. - name: Checkout submodules
  39. shell: bash
  40. run: |
  41. auth_header="$(git config --local --get http.https://github.com/.extraheader)"
  42. git submodule sync --recursive
  43. git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
  44. - name: Set up php ${{ matrix.php-versions }}
  45. uses: shivammathur/setup-php@v2
  46. with:
  47. php-version: ${{ matrix.php-versions }}
  48. extensions: ctype,curl,dom,fileinfo,gd,imagick,intl,json,mbstring,oci8,openssl,pcntl,pdo_sqlite,posix,sqlite,xml,zip
  49. tools: phpunit:9
  50. coverage: none
  51. - name: Set up Nextcloud
  52. run: |
  53. mkdir data
  54. ./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
  55. php -f index.php
  56. - name: PHPUnit
  57. working-directory: tests
  58. run: phpunit --configuration phpunit-autotest.xml --group DB,SLOWDB
  59. - name: Run repair steps
  60. run: |
  61. ./occ maintenance:repair --include-expensive
  62. summary:
  63. permissions:
  64. contents: none
  65. runs-on: ubuntu-latest
  66. needs: phpunit-oci
  67. if: always()
  68. name: phpunit-oci-summary
  69. steps:
  70. - name: Summary status
  71. run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi