Skip to content

Commit

Permalink
Print messages in console (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoapaes authored Mar 11, 2021
1 parent 12b2d7b commit 94f1e68
Show file tree
Hide file tree
Showing 14 changed files with 1,571 additions and 2,295 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ PHP_VERSION=56|73|74|80
GITHUB_OWNER: Owner of repository
GITHUB_REPO: Name of repository
GITHUB_PR_NUMBER: Number of pull request of repository
GITHUB_TOKEN: Token of the user's github who will post the comment
GITHUB_TOKEN: Token of the user's github who will post the comment
TEST_LANG: Language
TEST_TITLE: Message to show in title
TEST_FOOTER: Show footer with version of PHP
30 changes: 30 additions & 0 deletions .github/workflows/ci-56.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PHP 5.6

on:
push:
branches:
- master

pull_request:

jobs:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Prepare code
run: |
touch .env
echo "GITHUB_OWNER=likesistemas" >> .env
echo "GITHUB_REPO=codeception-github-reporter" >> .env
echo "GITHUB_PR_NUMBER=${{github.event.number}}" >> .env
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> .env
echo "PHP_VERSION=56" >> .env
- name: Run tests
run: |
docker-compose run php composer update
docker-compose up
31 changes: 31 additions & 0 deletions .github/workflows/ci-73.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PHP 7.3

on:

push:
branches:
- master

pull_request:

jobs:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Prepare code
run: |
touch .env
echo "GITHUB_OWNER=likesistemas" >> .env
echo "GITHUB_REPO=codeception-github-reporter" >> .env
echo "GITHUB_PR_NUMBER=${{github.event.number}}" >> .env
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> .env
echo "PHP_VERSION=73" >> .env
- name: Run tests
run: |
docker-compose run php composer update
docker-compose up
31 changes: 31 additions & 0 deletions .github/workflows/ci-74.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PHP 7.4

on:

push:
branches:
- master

pull_request:

jobs:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Prepare code
run: |
touch .env
echo "GITHUB_OWNER=likesistemas" >> .env
echo "GITHUB_REPO=codeception-github-reporter" >> .env
echo "GITHUB_PR_NUMBER=${{github.event.number}}" >> .env
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> .env
echo "PHP_VERSION=74" >> .env
- name: Run tests
run: |
docker-compose run php composer update
docker-compose up
31 changes: 31 additions & 0 deletions .github/workflows/ci-80.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: PHP 8.0

on:

push:
branches:
- master

pull_request:

jobs:

test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Prepare code
run: |
touch .env
echo "GITHUB_OWNER=likesistemas" >> .env
echo "GITHUB_REPO=codeception-github-reporter" >> .env
echo "GITHUB_PR_NUMBER=${{github.event.number}}" >> .env
echo "GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> .env
echo "PHP_VERSION=80" >> .env
- name: Run tests
run: |
docker-compose run php composer update
docker-compose up
43 changes: 43 additions & 0 deletions .php_cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?php

$rules = [
'@PSR2' => true,
'array_syntax' => ['syntax' => 'short'],
'no_multiline_whitespace_before_semicolons' => true,
'no_short_echo_tag' => true,
'no_unused_imports' => true,
'not_operator_with_successor_space' => true,
'no_useless_else' => true,
'ordered_imports' => ['sort_algorithm' => 'none', 'imports_order' => ['const', 'class', 'function']],
'phpdoc_add_missing_param_annotation' => true,
'phpdoc_indent' => true,
'phpdoc_no_package' => true,
'phpdoc_order' => true,
'phpdoc_separation' => true,
'phpdoc_single_line_var_spacing' => true,
'phpdoc_trim' => true,
'phpdoc_var_without_name' => true,
'phpdoc_to_comment' => true,
'single_quote' => true,
'ternary_operator_spaces' => true,
'trailing_comma_in_multiline_array' => true,
'trim_array_spaces' => true
];

$excludes = [
'vendor'
];

$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude($excludes)
->notName('README.md')
->notName('*.xml')
->notName('*.yml')
->notName('_ide_helper.php')
;

return PhpCsFixer\Config::create()
->setRules($rules)
->setFinder($finder)
;
5 changes: 5 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"fterrag.vscode-php-cs-fixer"
]
}
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"files.encoding": "utf8"
"files.encoding": "utf8",
"[php]": {
"editor.defaultFormatter": "fterrag.vscode-php-cs-fixer"
},
"php-cs-fixer.onsave": true,
"php-cs-fixer.showOutput": false,
"php-cs-fixer.autoFixByBracket": true
}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@
}
},
"require-dev": {
"phpunit/phpunit": "^5.7 || ^9.0",
"codeception/codeception": "^4.1",
"codeception/module-asserts": "^1.0.0"
},
"scripts": {
"test:ci": "codecept run --ext \"Like\\Codeception\\GitHubReporter\""
"test:ci": "codecept run --no-exit --ext \"Like\\Codeception\\GitHubReporter\""
}
}
Loading

0 comments on commit 94f1e68

Please sign in to comment.