diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..cb19c1c --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,15 @@ +name: Test + +on: + push: + +jobs: + tests: + name: Tests + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Tests + run: docker-compose run --rm php ./run-tests.sh + diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 207b512..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,127 +0,0 @@ -######## Set this as appropriate for the project. ######## - -filter: - paths: - - features/* - - src/* - dependency_paths: - - vendor/* - excluded_paths: - - vendor/* - -########### [End of project-specific section] ############ - -tools: - php_code_sniffer: - enabled: true - config: - standard: PSR2 - -checks: - php: - one_class_per_file: true - side_effects_or_types: true - no_mixed_inline_html: false - php5_style_constructor: true - no_global_keyword: true - avoid_usage_of_logical_operators: true - psr2_class_declaration: true - no_underscore_prefix_in_properties: true - no_underscore_prefix_in_methods: true - blank_line_after_namespace_declaration: true - single_namespace_per_use: true - psr2_switch_declaration: true - avoid_superglobals: true - security_vulnerabilities: true - no_exit: true - use_self_instead_of_fqcn: true - uppercase_constants: true - simplify_boolean_return: true - return_doc_comments: true - return_doc_comment_if_not_inferrable: true - remove_extra_empty_lines: true - properties_in_camelcaps: true - prefer_while_loop_over_for_loop: 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 - no_short_variable_names: - minimum: '3' - no_short_method_names: - minimum: '3' - no_goto: true - newline_at_end_of_file: true - naming_conventions: - local_variable: '^[a-z][a-zA-Z0-9]*$' - constant_name: '^[A-Z][A-Z0-9]*(?:_[A-Z0-9]+)*$' - property_name: '^[a-z][a-zA-Z0-9]*$' - method_name: '^((?:[a-z]|__)[a-zA-Z0-9]*|test[A-Z][_a-zA-Z0-9]*)$' - parameter_name: '^[a-z][a-zA-Z0-9]*$' - interface_name: '^[A-Z][a-zA-Z0-9]*Interface$' - type_name: '^([A-Z][a-zA-Z0-9]*)$' - exception_name: '^[A-Z][a-zA-Z0-9]*Exception$' - isser_method_name: '^(?:is|can|has|should|may|supports)' - more_specific_types_in_doc_comments: true - line_length: - max_length: '120' - fix_use_statements: - remove_unused: true - preserve_multiple: false - preserve_blanklines: false - order_alphabetically: true - fix_line_ending: true - encourage_single_quotes: true - classes_in_camel_caps: true - avoid_todo_comments: true - avoid_perl_style_comments: true - avoid_multiple_statements_on_same_line: true - avoid_fixme_comments: true - -coding_style: - php: - spaces: - around_operators: - concatenation: true - negation: true - other: - after_type_cast: false - braces: - classes_functions: - class: new-line - function: new-line - if: - opening: end-of-line - for: - opening: end-of-line - while: - opening: end-of-line - do_while: - opening: end-of-line - switch: - opening: end-of-line - try: - opening: end-of-line - upper_lower_casing: - keywords: - general: lower - constants: - true_false_null: lower - -build_failure_conditions: - - # No classes/methods with a rating of D or worse. - - 'elements.rating(<= D).exists' - - # No more than two new classes/methods with a rating of C. - - 'elements.rating(<= C).new.count > 2' - - # No new coding style issues allowed - - 'issues.label("coding-style").new.exists' - - # No issues of major or higher severity - - 'issues.severity(>= MAJOR).exists' - - # Don't let Code Quality Rating drop below 6. - - 'project.metric("scrutinizer.quality", < 6)' diff --git a/codeship-services.yml b/codeship-services.yml deleted file mode 100644 index 0356881..0000000 --- a/codeship-services.yml +++ /dev/null @@ -1,8 +0,0 @@ -php: - image: silintl/php8:8.1 - volumes: - - ./:/data - extra_hosts: - - "trusted_host.org:10.0.1.1" - - "untrusted_host.org:22.0.1.1" - working_dir: /data diff --git a/codeship-steps.yml b/codeship-steps.yml deleted file mode 100644 index f09af31..0000000 --- a/codeship-steps.yml +++ /dev/null @@ -1,3 +0,0 @@ -- name: test - service: php - command: ./run-tests.sh