diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..06d43fb --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,46 @@ +name: Tests + +on: + workflow_dispatch: + + push: + paths-ignore: + - '*.md' + - '.github/**' + + pull_request: + paths-ignore: + - '*.md' + - '.github/**' + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + php: [8.1] + experimental: [false] + include: + - php: 8.1 + analysis: true + + steps: + - name: Checkout + uses: actions/checkout@v4 + run: echo "${{ github.repository }} repository has been cloned." + + - name: PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + extensions: none, curl + coverage: xdebug + + - name: Composer + uses: ramsey/composer-install@v2 + + - name: Tests + run: vendor/bin/phpunit --coverage-clover clover.xml + diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 8e45326..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,64 +0,0 @@ -filter: - excluded_paths: [vendor/*, tests/*] - -tools: - php_mess_detector: true - php_code_sniffer: - config: - standard: PSR4 - filter: - paths: ['src'] - sensiolabs_security_checker: true - php_pdepend: true - php_loc: - enabled: true - filter: - paths: ['src'] - -build_failure_conditions: - - 'project.metric("scrutinizer.quality", < 9)' - - 'project.metric_change("scrutinizer.test_coverage", < -0.005)' - - 'issues.severity(>= MAJOR).new.exists' - -checks: - php: - remove_extra_empty_lines: true - remove_php_closing_tag: true - remove_trailing_whitespace: true - fix_use_statements: - remove_unused: true - preserve_multiple: false - preserve_blanklines: true - fix_php_opening_tag: true - fix_linefeed: true - fix_line_ending: true - fix_identation_4spaces: true - fix_doc_comments: true - uppercase_constants: true - use_self_instead_of_fqcn: true - simplify_boolean_return: true - return_doc_comments: true - return_doc_comment_if_not_inferrable: true - phpunit_assertions: true - parameters_in_camelcaps: true - parameter_doc_comments: true - param_doc_comment_if_not_inferrable: true - optional_parameters_at_the_end: true - newline_at_end_of_file: true - encourage_single_quotes: true - -build: - environment: - timezone: UTC - php: - version: 8.1.26 - ini: - "xdebug.mode": coverage - nodes: - tests: - tests: - override: - - command: ./vendor/bin/phpunit --coverage-clover=clover.xml - coverage: - file: clover.xml - format: php-clover diff --git a/composer.json b/composer.json index 4d6df71..19e61b9 100644 --- a/composer.json +++ b/composer.json @@ -9,14 +9,11 @@ "ext-json": "*", "php": "^8.1", "microsoft/microsoft-graph": "^2.0.0", - "ramsey/uuid" : "^4.0", - "guzzlehttp/guzzle": "^6.2 || ^7.2", - "monolog/monolog" : "^2.3", - "myclabs/php-enum": "^1.6.0" + "monolog/monolog" : "^2.3" }, "require-dev": { - "squizlabs/php_codesniffer": "^2.5", - "friendsofphp/php-cs-fixer" : "^2.14.0", + "squizlabs/php_codesniffer": "^3.7.2", + "friendsofphp/php-cs-fixer" : "^v3.40.2", "phpunit/phpunit": "^10.5.1" }, "minimum-stability": "stable",