Skip to content

Commit 989b3b6

Browse files
authored
Merge pull request #423 from nextcloud/actions/cypress
Move cypress to gh actions
2 parents ea40dd7 + ae7f0ae commit 989b3b6

8 files changed

Lines changed: 5781 additions & 4492 deletions

File tree

.drone.yml

Lines changed: 0 additions & 168 deletions
This file was deleted.

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ module.exports = {
33
appVersion: true
44
},
55
extends: [
6-
'nextcloud'
6+
'@nextcloud'
77
]
88
};

.github/workflows/cypress.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Cypress
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
- stable*
9+
10+
env:
11+
APP_NAME: viewer
12+
13+
jobs:
14+
cypress:
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
# run 4 copies of the current job in parallel
21+
containers: [1, 2, 3, 4]
22+
node-versions: ['12.x']
23+
php-versions: ['7.4']
24+
25+
name: Runner ${{ matrix.containers }}
26+
steps:
27+
- name: Checkout server
28+
uses: actions/checkout@v2
29+
with:
30+
repository: nextcloud/server
31+
ref: ${{ github.base_ref }}
32+
33+
- name: Checkout submodules
34+
shell: bash
35+
run: |
36+
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
37+
git submodule sync --recursive
38+
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
39+
40+
- name: Checkout app
41+
uses: actions/checkout@v2
42+
with:
43+
path: apps/${{ env.APP_NAME }}
44+
45+
- name: Set up node ${{ matrix.node-versions }}
46+
uses: actions/setup-node@v1
47+
with:
48+
node-versions: ${{ matrix.node-versions }}
49+
50+
- name: Install dependencies & build app
51+
working-directory: apps/${{ env.APP_NAME }}
52+
run: |
53+
npm ci
54+
npm run build --if-present
55+
56+
- name: Set up php ${{ matrix.php-versions }}
57+
uses: shivammathur/setup-php@v1
58+
with:
59+
php-version: ${{ matrix.php-versions }}
60+
tools: phpunit
61+
extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite
62+
coverage: none
63+
64+
- name: Set up Nextcloud
65+
run: |
66+
mkdir data
67+
./occ maintenance:install --verbose --database sqlite --admin-user admin --admin-pass admin
68+
./occ app:enable ${{ env.APP_NAME }}
69+
php -S localhost:8080 &
70+
71+
- name: Cypress run
72+
uses: cypress-io/github-action@v1
73+
with:
74+
record: true
75+
parallel: true
76+
# cypress env
77+
working-directory: apps/${{ env.APP_NAME }}
78+
ci-build-id: ${{ github.sha }}-${{ github.run_number }}
79+
# wait for server before running
80+
wait-on: "http://localhost:8080"
81+
env:
82+
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
83+
CYPRESS_baseUrl: http://localhost:8080/index.php

cypress/integration/images-custom-list-loadmore.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import { randHash } from '../utils/'
2424
const randUser = randHash()
2525

26-
describe('Open images in viewer', function() {
26+
describe('Open custom list of images in viewer', function() {
2727
before(function() {
2828
// Init user
2929
cy.nextcloudCreateUser(randUser, 'password')

js/viewer.js

Lines changed: 32 additions & 40 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/viewer.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)