-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
92 lines (92 loc) · 3.21 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
os: linux
language: php
php:
- 7.1
- 7.2
- 7.3
env:
global:
- CORE_BRANCH=stable16
- APP_NAME=ocr
jobs:
- DB=sqlite
branches:
only:
- master
git:
submodules: false
stages:
- test
- name: release
if: NOT type IN (pull_request)
before_install:
- sudo apt-get -y install jq
- curl -Ls -o codacy-coverage-reporter "$(curl -Ls https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r '.assets | map({name, browser_download_url} | select(.name | contains("codacy-coverage-reporter-linux"))) | .[0].browser_download_url')"
- chmod +x codacy-coverage-reporter
- nvm install 12
- nvm use 12
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
- ". ./before_install.sh $APP_NAME $CORE_BRANCH $DB"
- cd ../server
- "./occ check"
- "./occ status"
- "./occ app:list"
- "./occ app:enable $APP_NAME"
- "./occ app:list"
- cd apps/$APP_NAME/
- npm install
script:
- sh -c "find . -name \*.php -exec php -l \"{}\" \;"
- cd ../../
- echo "Running Nextcloud Code Check 1"
- "./occ app:check-code $APP_NAME -c private -c strong-comparison"
- echo "Running Nextcloud Code Check 2"
- "./occ app:check-code $APP_NAME -c deprecation"
- cd apps/$APP_NAME/
- echo "Running PHP Unit Tests"
- cd tests/Unit
- phpunit --configuration phpunit.xml
- cd ../..
- echo "Running JavaScript/TypeScript Unit Tests"
- npm run lint && npm run test && npm run build
- echo "Sending Test Coverage to Codacy"
- "./codacy-coverage-reporter report -l typescript -r tests/js/coverage/lcov.info"
- cd ..
jobs:
include:
- stage: release
php: 7.2
before_install:
- git clone --depth 1 -b $CORE_BRANCH https://github.com/nextcloud/server
- cd server
- git submodule update --init
- cd ..
- nvm install 12
- nvm use 12
- npm install
before_script: skip
script:
- npm run build
before_deploy:
- git config --local user.name "janis91"
- git config --local user.email "[email protected]"
- node ci/gitTag.js
- "./ci/build_release.sh"
- openssl aes-256-cbc -K $encrypted_db642c3b0665_key -iv $encrypted_db642c3b0665_iv -in ocr.key.enc -out ocr.key -d
- "./server/occ integrity:sign-app --privateKey=$PWD/ocr.key --certificate=$PWD/ocr.crt --path=$PWD/release"
- mv release ocr
- tar cfz ocr.tar.gz ocr
- rm -rf ocr/
deploy:
provider: releases
skip_cleanup: true
overwrite: true
token:
secure: rblLFytrl6G18z7H7f3cQcgJHYU6Hk7rrSpzlG0gMFfsWfgUKhHrj5no7/nO9rciK6TKlaj20mXK512oaZRIou9uj+hN4yVZA6bUsaQU4jL51JB/KHi5BMH7x6rU7lG2YbAk2LhGd1jIUcn9NB0KWB8fnfFKdCuGPSL/ebB8EwKYNgNuc/T3Wo1e75AnZRd8wzybGMlnpGnjoWLpqhOYRgEm4463vrBBszPLFY9Nd4Fvhv6R1P8clsEC3EwJRhSlOQztEUk0EnNRW1dSJqPMJMI+N8CuN0YBzbmpfpSgYUSJanPiB/lz8Q6Suc8EIwoAid7QIrwrnHEdYeBKLl0izjs3P/orwzkoRGilbYnH9ZgSo0ws7q12e8VArUzcs+M+B1dBm9Q3nePEGcmYm8nkYsU/dSlaEz0AMJatTClKP9329lGZRy3e9rHdZUBZZChm7qHDQZDG7HP4VRMH2pSHQQYl8jDH/G1me0RvqDeTPB2EIx/dJUtpbEEB5Ips55slX1HX1Va/UMpphM3YwabAd3VXG+NHHOeqjWc3zu+WWzMP0m8soVnqX1iuwJOE14mm5uPpEjV/863Ai4If37NLd5qs47ZIkzqe7hWnnClzdwkLShYh0ZxOO+VixdZjqyVE+fsoc6RnUCLatcNIzltCzEIFjGDGMidLz0gySilOD1M=
file: ocr.tar.gz
on:
repo: janis91/ocr
branch: master
after_deploy:
- "./ci/release_to_nextcloud.sh"
- rm -f ocr.key