diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index 325e6b4b4..6fdb31d88 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -4,7 +4,7 @@ on: pull_request: push: branches: - - master + - main - stable* env: @@ -14,7 +14,7 @@ env: jobs: cypress: - runs-on: ubuntu-latest + runs-on: self-hosted strategy: fail-fast: false @@ -33,6 +33,11 @@ jobs: - name: Set up npm7 run: npm i -g npm@7 + - name: Register text Git reference + run: | + text_app_ref="$(if [ "${{ matrix.server-versions }}" = "master" ]; then echo -n "main"; else echo -n "${{ matrix.server-versions }}"; fi)" + echo "text_app_ref=$text_app_ref" >> $GITHUB_ENV + - name: Checkout server uses: actions/checkout@v3 with: @@ -51,11 +56,18 @@ jobs: with: path: apps/${{ env.APP_NAME }} + - name: Checkout text + uses: actions/checkout@v3 + with: + repository: nextcloud/text + ref: ${{ env.text_app_ref }} + path: apps/text + - name: Set up php ${{ matrix.php-versions }} - uses: shivammathur/setup-php@2.21.2 + uses: shivammathur/setup-php@2.25.4 with: php-version: ${{ matrix.php-versions }} - extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite, zip, gd, apcu + extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite ini-values: apc.enable_cli=on coverage: none @@ -84,7 +96,7 @@ jobs: curl -v http://localhost:8081/index.php/login - name: Cypress run - uses: cypress-io/github-action@v4 + uses: cypress-io/github-action@v5 with: record: true parallel: false @@ -96,7 +108,7 @@ jobs: npm_package_name: ${{ env.APP_NAME }} - name: Upload test failure screenshots - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: failure() with: name: Upload screenshots @@ -104,7 +116,7 @@ jobs: retention-days: 5 - name: Upload nextcloud logs - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 if: failure() with: name: Upload nextcloud log