Verified Commit 047d3546 authored by Thomas Citharel's avatar Thomas Citharel 🏃🏻
Browse files

Add CI


Signed-off-by: Thomas Citharel's avatarThomas Citharel <tcit@tcit.fr>
parent 694713da
Pipeline #378122 passed with stages
in 3 minutes and 24 seconds
......@@ -22,3 +22,4 @@ js/
translationtool.phar
.php_cs.cache
.phpunit.result.cache
junit.xml
stages:
- lint
- build
- test
.update-apt: &update-apt
- apt-get update
.php-zip: &php-zip
- apt-get -y --no-install-recommends install libzip-dev
- docker-php-ext-install zip
.php-gd: &php-gd
- apt-get -y --no-install-recommends install libpng-dev
- docker-php-ext-configure gd
- docker-php-ext-install -j$(nproc) gd
.php-xdebug: &php-xdebug
- pecl install xdebug
- docker-php-ext-enable xdebug
.composer: &composer
- curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
.php-for-lint: &php-for-lint
image: php:7.4-cli
stage: lint
before_script:
- *update-apt
- *php-zip
- *composer
- composer install
.setup-nextcloud: &setup-nextcloud
- apt-get update
- apt-get -y --no-install-recommends install git
- cp -r . /tmp/drop_account
- git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $NEXTCLOUD_VERSION nextcloud
- php -f nextcloud/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass=''
- cp -r /tmp/drop_account nextcloud/apps/
.install-nextcloud-script: &install-nextcloud-script
before_script:
- *update-apt
- *php-zip
- *php-gd
- *php-xdebug
- *composer
- *setup-nextcloud
- cd nextcloud/apps/drop_account
- composer install
.test-php: &test-php
<<: *install-nextcloud-script
stage: test
parallel:
matrix:
- NEXTCLOUD_VERSION: [ stable20 ]
script:
- composer run test -- --coverage-text --colors=never --log-junit junit.xml
variables:
XDEBUG_MODE: coverage
artifacts:
when: always
paths:
- nextcloud/apps/drop_account/junit.xml
- nextcloud/apps/drop_account/coverage/clover.unit.xml
- nextcloud/apps/drop_account/html-coverage
reports:
junit: nextcloud/apps/drop_account/junit.xml
test-7.3:
<<: *test-php
image: php:7.3-cli
parallel:
matrix:
- NEXTCLOUD_VERSION: [ stable19, stable20 ]
test-7.4:
<<: *test-php
image: php:7.4-cli
parallel:
matrix:
- NEXTCLOUD_VERSION: [ stable19, stable20 ]
test-8:
<<: *test-php
image: php:8.0-cli
parallel:
matrix:
- NEXTCLOUD_VERSION: [ master ]
allow_failure: true
build-js:
stage: build
image: node:14
before_script:
- npm ci
script:
- npm run build
lint-xml:
stage: lint
image: debian:latest
before_script:
- apt-get update && apt-get -y --no-install-recommends install wget libxml2-utils ca-certificates
- wget https://apps.nextcloud.com/schema/apps/info.xsd
script:
- xmllint ./appinfo/info.xml --schema ./info.xsd --noout
lint-php:
<<: *php-for-lint
script:
- composer run lint
php-cs-fixer:
<<: *php-for-lint
script:
- composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
lint-js:
image: node:14
stage: lint
before_script:
- npm ci
script:
- npm run lint
.install-nextcloud-for-code-check: &install-nextcloud-for-code-check
before_script:
- *update-apt
- *php-zip
- *php-gd
- *setup-nextcloud
- cd nextcloud
code-check:
<<: *install-nextcloud-for-code-check
image: php:7.4-cli
stage: lint
parallel:
matrix:
- NEXTCLOUD_VERSION: [ stable20 ]
script: php occ app:check-code drop_account
......@@ -1074,9 +1074,9 @@
}
},
"@nextcloud/axios": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-1.5.0.tgz",
"integrity": "sha512-n7jnv6UmnF8Ti4Mp2a4K9EXen1q9q2qMug9Y8uFmdPX+wItPdJlDGVAtDH+oEkAj77jHjNNsL2rZz/Oy9t56xw==",
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/@nextcloud/axios/-/axios-1.6.0.tgz",
"integrity": "sha512-yhCEFIQza1LBWJqq66ZcPxIjG60A/rUdw+oF7T796HXfW1JFsrRORmmTmV0b2Bxd0v9xSkW3Lgb3hKNk1aQBSw==",
"requires": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
......@@ -2099,6 +2099,16 @@
"integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
"optional": true
},
"bindings": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
"integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
"dev": true,
"optional": true,
"requires": {
"file-uri-to-path": "1.0.0"
}
},
"bluebird": {
"version": "3.7.2",
"resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz",
......@@ -3931,9 +3941,9 @@
"dev": true
},
"eslint-plugin-vue": {
"version": "7.4.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.4.0.tgz",
"integrity": "sha512-bYJV3nHSGV5IL40Ti1231vlY8I2DzjDHYyDjRv9Z1koEI7qyV2RR3+uKMafHdOioXYH9W3e1+iwe4wy7FIBNCQ==",
"version": "7.4.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-vue/-/eslint-plugin-vue-7.4.1.tgz",
"integrity": "sha512-W/xPNHYIkGJphLUM2UIYYGKbRw3BcDoMIPY9lu1TTa2YLiZoxurddfnmOP+UOVywxb5vi438ejzwvKdZqydtIw==",
"dev": true,
"requires": {
"eslint-utils": "^2.1.0",
......@@ -4363,6 +4373,13 @@
"flat-cache": "^3.0.4"
}
},
"file-uri-to-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
"integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
"dev": true,
"optional": true
},
"fill-range": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
......@@ -9278,6 +9295,17 @@
}
}
},
"url-loader": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz",
"integrity": "sha512-3BTV812+AVHHOJQO8O5MkWgZ5aosP7GnROJwvzLS9hWDj00lZ6Z0wNak423Lp9PBZN05N+Jk/N5Si8jRAlGyWA==",
"dev": true,
"requires": {
"loader-utils": "^2.0.0",
"mime-types": "^2.1.27",
"schema-utils": "^3.0.0"
}
},
"use": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
......@@ -9631,6 +9659,7 @@
"dev": true,
"optional": true,
"requires": {
"bindings": "^1.5.0",
"nan": "^2.12.1"
}
}
......
......@@ -80,7 +80,6 @@
import { loadState } from '@nextcloud/initial-state'
import SettingsSection from '@nextcloud/vue/dist/Components/SettingsSection'
import { showError } from '@nextcloud/dialogs'
import '@nextcloud/dialogs/styles/toast.scss'
export default {
name: 'AdminSettings',
......
......@@ -73,7 +73,6 @@ import Axios from '@nextcloud/axios'
import { generateUrl } from '@nextcloud/router'
import { showError } from '@nextcloud/dialogs'
import confirmPassword from '@nextcloud/password-confirmation'
import '@nextcloud/dialogs/styles/toast.scss'
import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent'
export default {
......
import Vue from 'vue'
import { translate, translatePlural } from '@nextcloud/l10n'
import '@nextcloud/dialogs/styles/toast.scss'
const APP_NAME = 'drop_account'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment