Skip to content

Commit

Permalink
updated workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Aug 25, 2021
1 parent 30bcb56 commit 6a9a2d7
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 11 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,9 @@
.gitignore export-ignore
.github export-ignore
.travis.yml export-ignore
ecs.php export-ignore
phpstan.neon export-ignore
tests/ export-ignore

*.sh eol=lf
*.php* diff=php linguist-language=PHP
10 changes: 5 additions & 5 deletions .github/workflows/coding-style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 7.1
coverage: none

- run: composer create-project nette/code-checker temp/code-checker ^3 --no-progress
Expand All @@ -22,10 +22,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- run: composer create-project nette/coding-standard temp/coding-standard ^2 --no-progress
- run: php temp/coding-standard/ecs check src tests --config temp/coding-standard/coding-standard-php71.yml
- run: composer create-project nette/coding-standard temp/coding-standard ^3 --no-progress
- run: php temp/coding-standard/ecs check
4 changes: 2 additions & 2 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v1
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
coverage: none

- run: composer install --no-progress --prefer-dist
- run: composer phpstan
- run: composer phpstan -- --no-progress
continue-on-error: true # is only informative
6 changes: 4 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ jobs:
coverage: none

- run: composer install --no-progress --prefer-dist
- run: wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
- run: vendor/bin/tester -p phpdbg tests -s -C --coverage ./coverage.xml --coverage-src ./src
- run: php coveralls.phar --verbose --config tests/.coveralls.yml
- run: wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar
- env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: php php-coveralls.phar --verbose --config tests/.coveralls.yml
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
},
"minimum-stability": "dev",
"scripts": {
"phpstan": "phpstan analyse --level 8 src",
"phpstan": "phpstan analyse",
"tester": "tester tests -s"
},
"extra": {
Expand Down
5 changes: 5 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
parameters:
level: 8

paths:
- src
2 changes: 1 addition & 1 deletion tests/.coveralls.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# for php-coveralls
service_name: travis-ci
service_name: github-actions
coverage_clover: coverage.xml
json_path: coverage.json

0 comments on commit 6a9a2d7

Please sign in to comment.