Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action build #5

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
28 changes: 14 additions & 14 deletions .github/workflows/build.yml
Expand Up @@ -4,38 +4,38 @@ on:
branches: [master]
paths-ignore:
- "**.md"
- ".github/workflows/**"

pull_request:
branches: [master]
paths-ignore:
- "**.md"
- ".github/workflows/**"

jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
php: [7.2, 7.3, 7.4, 8.0]
php: [7.3, 7.4, 8.0]

steps:
- uses: actions/checkout@v1
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug2
- uses: php-actions/composer@v5

- name: phpunit
uses: php-actions/phpunit@v2
- name: Run phpunit
run: vendor/bin/phpunit --coverage-clover="coverage.xml"

- name: codecov test

- name: Run codecov
uses: codecov/codecov-action@v1
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true





token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
verbose: true


1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -2,3 +2,4 @@
/.idea
composer.lock
.phpunit.result.cache
coverage.xml
43 changes: 10 additions & 33 deletions phpunit.xml
@@ -1,40 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
>

<coverage includeUncoveredFiles="true"
processUncoveredFiles="true"
ignoreDeprecatedCodeUnits="true"
>
<include>
<directory suffix=".php">src</directory>
</include>

<exclude>
<directory suffix=".php">src</directory>
<file>./test/AbstractTesting.php</file>
<file>./test/DummyCredentials.php</file>
<file>./test/Model/ObjectUsedByTrait.php</file>
<file>./test/Client/TempObject.php</file>
</exclude>
</coverage>


<testsuites>
<testsuite name="Mocean SDK Test Suite">
<directory suffix=".php">./test/</directory>
<exclude>./test/AbstractTesting.php</exclude>
<exclude>./test/DummyCredentials.php</exclude>
<exclude>./test/Model/ObjectUsedByTrait.php</exclude>
<exclude>./test/Client/TempObject.php</exclude>
<testsuite name="Unit">
<directory suffix="Test.php">./test</directory>
</testsuite>
</testsuites>
</phpunit>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
</coverage>
</phpunit>
49 changes: 0 additions & 49 deletions src/Command/ClientTest.php

This file was deleted.

27 changes: 0 additions & 27 deletions src/Command/CommanderTest.php

This file was deleted.

44 changes: 0 additions & 44 deletions src/Command/Mc/SendSMSTest.php

This file was deleted.

49 changes: 0 additions & 49 deletions src/Command/Mc/TgRequestContactTest.php

This file was deleted.

45 changes: 0 additions & 45 deletions src/Command/Mc/TgSendAnimationTest.php

This file was deleted.

45 changes: 0 additions & 45 deletions src/Command/Mc/TgSendAudioTest.php

This file was deleted.