1
0

integration-litmus.yml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors
  2. # SPDX-License-Identifier: MIT
  3. name: Litmus integration tests
  4. on:
  5. pull_request:
  6. concurrency:
  7. group: integration-litmus-${{ github.head_ref || github.run_id }}
  8. cancel-in-progress: true
  9. jobs:
  10. changes:
  11. runs-on: ubuntu-latest-low
  12. outputs:
  13. src: ${{ steps.changes.outputs.src}}
  14. steps:
  15. - uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
  16. id: changes
  17. continue-on-error: true
  18. with:
  19. filters: |
  20. src:
  21. - '.github/workflows/**'
  22. - '3rdparty/**'
  23. - '**/*.php'
  24. - '**/lib/**'
  25. - '**/tests/**'
  26. - '**/vendor-bin/**'
  27. - 'build/integration/**'
  28. - '.php-cs-fixer.dist.php'
  29. - 'composer.json'
  30. - 'composer.lock'
  31. integration-litmus:
  32. runs-on: ubuntu-latest
  33. needs: changes
  34. if: needs.changes.outputs.src != 'false' && github.repository_owner != 'nextcloud-gmbh'
  35. strategy:
  36. # do not stop on another job's failure
  37. fail-fast: false
  38. matrix:
  39. php-versions: ['8.1']
  40. endpoint: ['webdav', 'dav']
  41. name: Litmus WebDAV ${{ matrix.endpoint }}
  42. steps:
  43. - name: Checkout server
  44. uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
  45. with:
  46. submodules: true
  47. - name: Set up php ${{ matrix.php-versions }}
  48. uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 #v2.31.1
  49. with:
  50. php-version: ${{ matrix.php-versions }}
  51. # https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
  52. extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
  53. coverage: 'none'
  54. ini-file: development
  55. env:
  56. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  57. - name: Set up Nextcloud
  58. run: |
  59. mkdir data
  60. ./occ maintenance:install \
  61. --verbose \
  62. --database=sqlite \
  63. --database-name=nextcloud \
  64. --database-user=root \
  65. --database-pass=rootpassword \
  66. --admin-user admin \
  67. --admin-pass admin
  68. ./occ config:system:set trusted_domains 2 --value=host.docker.internal:8080
  69. - name: Run Nextcloud
  70. run: |
  71. php -S 0.0.0.0:8080 &
  72. - name: Run Litmus test
  73. run: |
  74. docker run \
  75. --rm \
  76. --add-host=host.docker.internal:host-gateway \
  77. ghcr.io/nextcloud/continuous-integration-litmus-php8.3:latest \
  78. bash -c '\
  79. cd /tmp/litmus/litmus-0.13;
  80. make URL=http://host.docker.internal:8080/remote.php/${{ matrix.endpoint }}${{ matrix.endpoint == 'dav' && '/files/admin' || ''}} CREDS="admin admin" TESTS="basic copymove props largefile" check;
  81. status=$?;
  82. cat debug.log;
  83. exit $status;'
  84. - name: Print Nextcloud logs
  85. if: always()
  86. run: cat data/nextcloud.log
  87. integration-litmus-summary:
  88. permissions:
  89. contents: none
  90. runs-on: ubuntu-latest-low
  91. needs: [changes, integration-litmus]
  92. if: always()
  93. steps:
  94. - name: Summary status
  95. run: if ${{ needs.changes.outputs.src != 'false' && needs.integration-litmus.result != 'success' }}; then exit 1; fi