Skip to content

Commit

Permalink
CI - deprecate travis
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenekdrahos committed Feb 2, 2021
1 parent 90a8dc0 commit 696f54f
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 8 deletions.
1 change: 0 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ tests
vendor
*-phpqa.*
.php_cs*
.travis.yml
docker-compose.yml
phpunit.xml
auth.json
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
/.dockerignore export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.travis.yml export-ignore
/.github export-ignore
/phpunit.xml export-ignore
71 changes: 71 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: PHPQA CI

on:
pull_request:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Debug
run: pwd && ls -lAh

# DEPRECATED TRAVIS
#sudo: required
#dist: trusty
#language: php
#services:
# - docker
#matrix:
# include:
# - php: 5.4
# - php: 5.5
# - php: 5.6
# - php: 7.0
# - php: 7.1
# - php: 7.2
# - php: 7.3
# - php: 7.4
#install:
# - if [ -n "$GITHUB_OAUTH_TOKEN" ]; then composer config -g github-oauth.github.com ${GITHUB_OAUTH_TOKEN}; fi;
# - composer install --no-interaction
# - |
# # test latest tool versions (needs symfony3 components)
# if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then
# # 1) delete sebastian dependency hell
# composer remove phpunit/phpunit --dev --no-interaction && composer remove sebastian/phpcpd --no-interaction;
# # 2) update tools
# composer update;
# # 3) reinstall sebastian...
# composer require phpunit/phpunit:~7.0 --dev && composer require sebastian/phpcpd;
# # 4) install suggested tools
# bin/suggested-tools.sh install;
# # 5) hotfix CI issues - see commit 48dd427
# composer require sensiolabs/security-checker:~5;
# fi
# # test installing suggested tools like docker image
# if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.2" ]]; then
# bin/suggested-tools.sh install --prefer-dist;
# fi
#script:
# - vendor/phpunit/phpunit/phpunit
# - ./phpqa tools
# - bin/ci.sh
# - ls -lAh build
#deploy:
# - provider: script
# script: .docker/build-image
# skip_cleanup: false
# on:
# all_branches: true
# php: 7.2
## http://blog.wyrihaximus.net/2015/07/composer-cache-on-travis/
#cache:
# directories:
# - vendor
# - $HOME/.composer/cache
#
2 changes: 1 addition & 1 deletion .phpqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ phpmetrics:
phpstan:
level: 0
# https://github.com/phpstan/phpstan#configuration
# standard: tests/.travis/phpstan.neon
# standard: tests/.ci/phpstan.neon

phpunit:
# binary: vendor/bin/phpunit
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
## v1.11.0

* [#54](https://github.com/EdgedesignCZ/phpqa/pull/54) Advanced phpcs configuration
* define [custom reports](https://github.com/EdgedesignCZ/phpqa/blob/master/tests/.travis/.phpqa.yml#L2) in `phpcs.reports`
* define [custom reports](https://github.com/EdgedesignCZ/phpqa/blob/master/tests/.ci/.phpqa.yml#L2) in `phpcs.reports`
* [#53](https://github.com/EdgedesignCZ/phpqa/issues/53) - allow ignoring warnings in `phpcs.ignoreWarnings`

## v1.10.0
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Analyze PHP code with one command.
[![License](https://poser.pugx.org/edgedesign/phpqa/license)](https://packagist.org/packages/edgedesign/phpqa)
[![Latest Stable Version](https://poser.pugx.org/edgedesign/phpqa/v/stable)](/CHANGELOG.md)
[![Total Downloads](https://poser.pugx.org/edgedesign/phpqa/downloads)](https://packagist.org/packages/edgedesign/phpqa)
[![Build Status](https://travis-ci.org/EdgedesignCZ/phpqa.svg)](https://travis-ci.org/EdgedesignCZ/phpqa)
[![Windows status](https://ci.appveyor.com/api/projects/status/t9f05uk4cjcg294o?svg=true&passingText=Windows)](https://ci.appveyor.com/project/zdenekdrahos/phpqa)

## Requirements
Expand Down Expand Up @@ -255,7 +254,7 @@ Tool | Settings | Default Value | Your value
[pdepend.coverageReport](https://github.com/EdgedesignCZ/phpqa/pull/124) | Load Clover style CodeCoverage report | `null` | Path to report produced by PHPUnit's `--coverage-clover` option
[phpmd.standard](http://phpmd.org/documentation/creating-a-ruleset.html) | Ruleset | [Edgedesign's standard](/app/phpmd.xml) | Path to ruleset. To specify [multiple rule sets](https://phpmd.org/documentation/index.html#using-multiple-rule-sets), you can use an array
[phpcpd](https://github.com/sebastianbergmann/phpcpd/blob/de9056615da6c1230f3294384055fa7d722c38fa/src/CLI/Command.php#L136) | Minimum number of lines/tokens for copy-paste detection | 5 lines, 70 tokens |
[phpstan](https://github.com/phpstan/phpstan#configuration) | Level, config file | Level 0, `%currentWorkingDirectory%/phpstan.neon` | Take a look at [phpqa config in tests/.travis](/tests/.travis/) |
[phpstan](https://github.com/phpstan/phpstan#configuration) | Level, config file | Level 0, `%currentWorkingDirectory%/phpstan.neon` | Take a look at [phpqa config in tests/.ci](/tests/.ci/) |
[phpunit.binary](https://github.com/EdgedesignCZ/phpqa/blob/4947416/.phpqa.yml#L40) | Phpunit binary | phpqa's phpunit | Path to phpunit executable in your project, typically [`vendor/bin/phpunit`](https://gitlab.com/costlocker/integrations/blob/master/basecamp/backend/.phpqa.yml#L2) |
[phpunit.config](https://phpunit.de/manual/current/en/organizing-tests.html#organizing-tests.xml-configuration) | PHPUnit configuration, `analyzedDirs` and `ignoredDirs` are not used, you have to specify test suites in XML file | `null` | Path to `phpunit.xml` file
[phpunit.reports](https://phpunit.de/manual/current/en/textui.html) | Report types | no report | List of reports and formats, corresponds with CLI option, e.g. `--log-junit` is `log: [junit]` in `.phpqa.yml` |
Expand Down
2 changes: 1 addition & 1 deletion bin/ci.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh

./phpqa --config tests/.travis
./phpqa --config tests/.ci
2 changes: 1 addition & 1 deletion tests/.appveyor/.phpqa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ phpqa:
tools: phpmetrics,phploc,phpcs:0,php-cs-fixer,phpmd:0,pdepend,phpcpd:0,phpstan,phpunit:0,psalm,security-checker,parallel-lint

phpcs:
standard: ../.travis/phpcs.xml
standard: ../.ci/phpcs.xml
ignoreWarnings: false
reports:
file:
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 696f54f

Please sign in to comment.