Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Test against server branch fix/file-widget-viewer #1145

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 34 additions & 11 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,17 @@ jobs:

strategy:
matrix:
server-versions: ['stable27', 'master']
server-versions: ['fix/file-widget-viewer']

env:
PUPPETEER_SKIP_DOWNLOAD: true

steps:
- name: Register text Git reference
run: |
server_app_ref="$(if [ "${{ matrix.server-versions }}" = "fix/file-widget-viewer" ]; then echo -n "master"; else echo -n "${{ matrix.server-versions }}"; fi)"
echo "server_app_ref=$server_app_ref" >> $GITHUB_ENV

- name: Checkout server
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
Expand All @@ -72,18 +77,24 @@ jobs:
with:
repository: nextcloud/circles
path: apps/circles
ref: ${{ matrix.server-versions }}
ref: ${{ env.server_app_ref }}

- name: Checkout vue lib
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: nextcloud-libraries/nextcloud-vue
path: nextcloud-vue

- name: Checkout files_pdfviewer app
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
repository: nextcloud/files_pdfviewer
path: apps/files_pdfviewer
ref: ${{ matrix.server-versions }}
ref: ${{ env.server_app_ref }}

- 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)"
text_app_ref="$(if [ "${{ matrix.server-versions }}" = "fix/file-widget-viewer" ]; then echo -n "main"; else echo -n "${{ matrix.server-versions }}"; fi)"
echo "text_app_ref=$text_app_ref" >> $GITHUB_ENV

- name: Checkout text app
Expand All @@ -98,7 +109,7 @@ jobs:
with:
repository: nextcloud/viewer
path: apps/viewer
ref: ${{ matrix.server-versions }}
ref: ${{ env.server_app_ref }}

- name: Checkout app
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
Expand All @@ -122,6 +133,20 @@ jobs:
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
run: npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"

- name: Install dependencies & build lib
working-directory: nextcloud-vue
run: |
npm ci
npm run build --if-present
npm link

- name: Install dependencies & build text
working-directory: apps/text
run: |
npm ci
npm link @nextcloud/vue
npm run build --if-present

- name: Install dependencies & build
working-directory: apps/${{ env.APP_NAME }}
run: |
Expand All @@ -146,15 +171,13 @@ jobs:
containers: [1, 2, 3]
php-versions: ['8.0', '8.2']
databases: ['sqlite']
server-versions: ['stable27', 'master']
server-versions: ['fix/file-widget-viewer']
# Only use cypress cloud for PRs
use-cypress-cloud:
- ${{ vars.USE_CYPRESS_CLOUD && !!github.head_ref }}
exclude:
- php-versions: '8.0'
server-versions: 'stable27'
- php-versions: '8.0'
server-versions: 'master'
server-versions: 'fix/file-widget-viewer'
# Only use one container if we are not using the cypress cloud.
- use-cypress-cloud: false
containers: 2
Expand Down Expand Up @@ -244,15 +267,15 @@ jobs:
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure()
with:
name: Screenshots.${{ matrix.server-versions }}-${{ matrix.containers }}
name: Screenshots.nextcloud-${{ matrix.containers }}
path: apps/${{ env.APP_NAME }}/cypress/screenshots/
retention-days: 5

- name: Upload NC logs
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: always()
with:
name: ${{ matrix.server-versions }}-${{ matrix.containers }}.log
name: nextcloud-${{ matrix.containers }}.log
path: data/nextcloud.log
retention-days: 5

Expand Down