Skip to content

Commit

Permalink
test(ci): Revert some cypress workflow changes
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas <[email protected]>
  • Loading branch information
mejo- committed Mar 12, 2024
1 parent 875616a commit 4802f3c
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ env:

jobs:
init:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
outputs:
nodeVersion: ${{ steps.versions.outputs.nodeVersion }}
npmVersion: ${{ steps.versions.outputs.npmVersion }}
Expand Down Expand Up @@ -57,8 +57,9 @@ jobs:
path: apps/${{ env.APP_NAME }}

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
cache: 'npm'
node-version: ${{ steps.versions.outputs.nodeVersion }}

- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
Expand All @@ -73,22 +74,24 @@ jobs:
- name: Install node dependencies & build assistant app
working-directory: apps/assistant
run: |
composer install --no-dev
npm ci
npm run build
- name: Save context
uses: buildjet/cache/save@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
key: cypress-context-${{ github.run_id }}
path: ./

cypress:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
needs: init

strategy:
fail-fast: false
matrix:
node-version: [16]
containers: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
php-versions: [ '8.1' ]
run-in-parallel:
Expand All @@ -109,15 +112,16 @@ jobs:

steps:
- name: Restore context
uses: buildjet/cache/restore@e376f15c6ec6dc595375c78633174c7e5f92dc0e # v3
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
fail-on-cache-miss: true
key: cypress-context-${{ github.run_id }}
path: ./

- name: Set up node ${{ needs.init.outputs.nodeVersion }}
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
with:
cache: 'npm'
node-version: ${{ needs.init.outputs.nodeVersion }}

- name: Set up npm ${{ needs.init.outputs.npmVersion }}
Expand Down Expand Up @@ -155,8 +159,8 @@ jobs:
curl -v http://localhost:8081/index.php/login
cat data/nextcloud.log
- name: Run E2E cypress tests
uses: cypress-io/github-action@1b70233146622b69e789ccdd4f9452adc638d25a # v6.6.1
- name: Cypress run
uses: cypress-io/github-action@v4
with:
record: '${{ !!matrix.run-in-parallel }}' # only on pull requests
parallel: '${{ !!matrix.run-in-parallel }}' # only on pull requests
Expand All @@ -174,21 +178,21 @@ jobs:
SPLIT_INDEX: ${{ strategy.job-index }}


- name: Upload snapshots
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
- name: Upload test failure screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: snapshots_${{ matrix.containers }}
name: Upload screenshots
path: |
apps/${{ env.APP_NAME }}/cypress/screenshots/
apps/${{ env.APP_NAME }}/cypress/snapshots/
retention-days: 5

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

Expand Down

0 comments on commit 4802f3c

Please sign in to comment.