Skip to main content
Homepage
Explore
Search or go to…
/
Sign in
Explore
Primary navigation
Project
N
Nextcloud mail - PostGuard
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Collapse sidebar
Snippets
Groups
Projects
Show more breadcrumbs
Laura Kolijn
Nextcloud mail - PostGuard
Commits
87c0606c
Unverified
Commit
87c0606c
authored
Mar 9, 2020
by
Christoph Wurst
Browse files
Options
Downloads
Patches
Plain Diff
Move app code checker to an action
Signed-off-by:
Christoph Wurst
<
christoph@winzerhof-wurst.at
>
parent
081480bf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/lint.yml
+24
-0
24 additions, 0 deletions
.github/workflows/lint.yml
.travis.yml
+9
-14
9 additions, 14 deletions
.travis.yml
with
33 additions
and
14 deletions
.github/workflows/lint.yml
+
24
−
0
View file @
87c0606c
...
...
@@ -32,6 +32,30 @@ jobs:
-
name
:
Lint
run
:
composer run lint
app-code-check
:
runs-on
:
ubuntu-latest
strategy
:
matrix
:
nextcloud-versions
:
[
'
master'
]
name
:
Nextcloud ${{ matrix.nextcloud-versions }} app code check
steps
:
-
name
:
Set up php7.4
uses
:
shivammathur/setup-php@master
with
:
php-version
:
7.4
extension-csv
:
ctype,curl,dom,gd,iconv,intl,json,mbstring,openssl,posix,sqlite,xml,zip
coverage
:
xdebug
-
name
:
Checkout Nextcloud
run
:
git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b ${{ matrix.nextcloud-versions }} nextcloud
-
name
:
Run tests
run
:
php -f nextcloud/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database sqlite --database-pass=''
-
name
:
Checkout
uses
:
actions/checkout@master
with
:
path
:
nextcloud/apps/mail
-
name
:
Run tests
run
:
php -f nextcloud/occ app:check-code mail
node-linters
:
runs-on
:
ubuntu-latest
name
:
ESLint
...
...
...
...
This diff is collapsed.
Click to expand it.
.travis.yml
+
9
−
14
View file @
87c0606c
...
...
@@ -19,8 +19,6 @@ env:
-
DB=mysql
-
PATCH_VERSION_CHECK=FALSE
matrix
:
-
TEST_SUITE=LINT-PHP
-
TEST_SUITE=TEST-PHP
matrix
:
include
:
...
...
@@ -67,9 +65,9 @@ before_install:
-
if [[ "$DB" == 'mysql' ]]; then mysql -u root -e "GRANT ALL ON oc_autotest.* TO 'oc_autotest'@'localhost';"; fi
-
composer self-update
-
sh -c "if [ '$TEST_SUITE' = 'TEST-PHP' ]; then
make install-composer-deps-dev
; fi"
-
sh -c "if [ '$TEST_SUITE' = 'TEST-PHP' ]; then
make start-imap-docker
; fi"
-
sh -c "if [ '$TEST_SUITE' = 'TEST-PHP' ]; then
make start-smtp-docker
; fi"
-
make install-composer-deps-dev
-
make start-imap-docker
-
make start-smtp-docker
-
cd ..
-
git clone https://github.com/nextcloud/server.git --recursive --depth 1 -b $CORE_BRANCH core
-
if [[ "$PATCH_VERSION_CHECK" = "TRUE" ]]; then echo "<?php" > core/lib/versioncheck.php; fi
...
...
@@ -78,35 +76,32 @@ before_install:
before_script
:
# Set up core
-
sh -c "if [ '$TEST_SUITE' = 'TEST-PHP' ]; then
php -f core/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
; fi"
-
php -f core/occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
# Set up app
-
sh -c "if [ '$TEST_SUITE' = 'TEST-PHP' ]; then
php -f core/occ app:enable mail
; fi"
-
php -f core/occ app:enable mail
# Enable app twice to check occ errors of registered commands
-
sh -c "if [ '$TEST_SUITE' = 'TEST-PHP' ]; then
php -f core/occ app:enable mail
; fi"
-
php -f core/occ app:enable mail
-
cd core/apps/mail
-
sh -c "if [ '$TEST_SUITE' = 'TEST-JS' ]; then npm install -g npm@latest; fi"
-
sh -c "if [ '$TEST_SUITE' = 'TEST-JS' ]; then make dev-setup; fi"
# Prepare IMAP test docker
-
sh -c "if [ '$TEST_SUITE' = 'TEST-PHP' ]; then
make add-imap-account
; fi"
-
make add-imap-account
# XDebug is only needed if we report coverage -> speeds up other builds
-
if [[ "$PHP_COVERAGE" = "FALSE" ]]; then phpenv config-rm xdebug.ini ||
true
; fi
# Print running docker images, just to verify they did not crash
-
sh -c "if [ '$TEST_SUITE' = 'TEST-PHP' ]; then
docker ps
; fi"
-
docker ps
script
:
# Run server's app code checker
-
sh -c "if [ '$TEST_SUITE' = 'LINT-PHP' ]; then php ../../occ app:check-code mail; fi"
# Run JS tests
-
sh -c "if [ '$TEST_SUITE' = 'TEST-JS' ]; then npm test; fi"
# - sh -c "if [ '$TEST_JS' = 'TRUE' ]; then cat ./coverage/*/lcov.info | ./node_modules/coveralls/bin/coveralls.js; fi"
# Run PHP tests
-
sh -c "if [ '$TEST_SUITE' = 'TEST-PHP' ]; then
composer test:integration
; fi"
-
composer test:integration
-
if [[ "$PHP_COVERAGE" = "TRUE" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
-
if [[ "$PHP_COVERAGE" = "TRUE" ]]; then php ocular.phar code-coverage:upload --format=php-clover tests/clover.integration.xml; fi
...
...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
sign in
to comment