Skip to content

Commit

Permalink
Add Github action phpunit integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dmeltzer committed May 24, 2020
1 parent 055af4c commit 5f91fb2
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 2 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: CI

on: [push]

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- name: Clone nextcloud for test files
uses: actions/checkout@v2
with:
repository: nextcloud/server
path: nextcloud
submodules: true
- name: Install App
uses: actions/checkout@v2
with:
path: nextcloud/apps/gadgetbridge
- name: Configure Nextcloud & install composer
run: |
cd nextcloud
composer install -q --no-ansi --no-interaction --no-suggest --no-progress --prefer-dist
php occ maintenance:install --admin-pass=admin
php occ app:enable gadgetbridge
- name: Install dependencies
run: |
cd nextcloud/apps/gadgetbridge
composer install -q --no-ansi --no-interaction --no-suggest --no-progress --prefer-dist
- name: Run Tests
run: |
cd nextcloud/apps/gadgetbridge
phpunit
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
![CI](https://github.com/dmeltzer/gadgetbridge/workflows/CI/badge.svg)
# gadgetbridge
Nextcloud app to visualize the data of your gadgetbridge data

Expand Down
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{
"config": {
"vendor-dir": "lib/composer",
"optimize-autoloader": true
},
"require-dev": {
"phpunit/phpunit": "^9.1"
},
Expand Down
22 changes: 21 additions & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
@@ -1 +1,21 @@
<phpunit bootstrap="../nextcloud/tests/bootstrap.php" />
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/7.5/phpunit.xsd"
bootstrap="../../tests/bootstrap.php"
forceCoversAnnotation="true"
beStrictAboutCoversAnnotation="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
verbose="true">
<testsuites>
<testsuite name="default">
<directory suffix="Test.php">tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">lib</directory>
</whitelist>
</filter>
</phpunit>
1 change: 0 additions & 1 deletion tests/DatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
namespace OCA\GadgetBridge\Tests;

use OCA\GadgetBridge\Database;
use PHPUnit\Framework\TestCase;
use OCA\GadgetBridge\InvalidDatabaseException;

/**
Expand Down
Binary file modified tests/_data/Gadgetbridge
Binary file not shown.
Binary file removed tests/_data/Gadgetbridge-shm
Binary file not shown.
Empty file removed tests/_data/Gadgetbridge-wal
Empty file.

0 comments on commit 5f91fb2

Please sign in to comment.