|
| 1 | +name: Integration |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + paths: |
| 6 | + - '.github/workflows/integration.yml' |
| 7 | + - 'appinfo/**' |
| 8 | + - 'lib/**' |
| 9 | + - 'tests/**' |
| 10 | + |
| 11 | + push: |
| 12 | + branches: |
| 13 | + - master |
| 14 | + - stable* |
| 15 | + |
| 16 | +env: |
| 17 | + APP_NAME: sharepoint |
| 18 | + |
| 19 | +jobs: |
| 20 | + sqlite: |
| 21 | + runs-on: ubuntu-latest |
| 22 | + |
| 23 | + strategy: |
| 24 | + # do not stop on another job's failure |
| 25 | + fail-fast: false |
| 26 | + matrix: |
| 27 | + php-versions: ['7.4', '8.0', '8.1'] |
| 28 | + databases: ['sqlite'] |
| 29 | + server-versions: ['master'] |
| 30 | + |
| 31 | + name: integration-php${{ matrix.php-versions }}-${{ matrix.databases }} |
| 32 | + |
| 33 | + steps: |
| 34 | + - name: Checkout server |
| 35 | + uses: actions/checkout@v2 |
| 36 | + with: |
| 37 | + repository: nextcloud/server |
| 38 | + ref: ${{ matrix.server-versions }} |
| 39 | + |
| 40 | + - name: Checkout submodules |
| 41 | + shell: bash |
| 42 | + run: | |
| 43 | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" |
| 44 | + git submodule sync --recursive |
| 45 | + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 |
| 46 | + - name: Checkout app |
| 47 | + uses: actions/checkout@v2 |
| 48 | + with: |
| 49 | + path: apps/${{ env.APP_NAME }} |
| 50 | + |
| 51 | + - name: Set up php ${{ matrix.php-versions }} |
| 52 | + uses: shivammathur/setup-php@v2 |
| 53 | + with: |
| 54 | + php-version: ${{ matrix.php-versions }} |
| 55 | + extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite |
| 56 | + ini-values: zend.exception_ignore_args=Off |
| 57 | + coverage: none |
| 58 | + |
| 59 | + - name: Install app dependencies |
| 60 | + working-directory: apps/${{ env.APP_NAME }} |
| 61 | + run: composer i |
| 62 | + |
| 63 | + - name: Install test dependencies |
| 64 | + working-directory: apps/${{ env.APP_NAME }}/tests/Integration |
| 65 | + run: composer i |
| 66 | + |
| 67 | + - name: Set up Nextcloud |
| 68 | + env: |
| 69 | + DB_PORT: 4444 |
| 70 | + run: | |
| 71 | + mkdir data |
| 72 | + ./occ maintenance:install --verbose --database=${{ matrix.databases }} --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass admin |
| 73 | + php -f index.php |
| 74 | + ./occ app:enable files_external |
| 75 | + ./occ app:enable --force ${{ env.APP_NAME }} |
| 76 | + php -S localhost:8080 & |
| 77 | + - name: Integration |
| 78 | + working-directory: apps/${{ env.APP_NAME }}/tests/Integration |
| 79 | + run: bash run.sh |
0 commit comments