From 65d46b9db6e49bec89f3c27c53a39ce499fbf205 Mon Sep 17 00:00:00 2001 From: Kevin Krummnacker Date: Mon, 7 Dec 2020 23:59:54 +0100 Subject: [PATCH 1/4] remove travis --- .travis.yml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index cbfa0ab..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: php - -matrix: - include: - - php: 7.2 - env: - - psalm=yes - dist: bionic - - php: 7.3 - dist: bionic - env: - - psalm=yes - - php: 7.4 - env: - - psalm=yes - dist: bionic - -install: - - if [ "$deps" = "low" ]; then composer update --prefer-lowest; else composer install; fi - - if [ "$psalm" = "yes" ]; then composer require --dev vimeo/psalm; fi - -before_script: - - mkdir -p build/logs - -script: - - vendor/bin/phpunit --coverage-clover build/logs/clover.xml - - if [ "$psalm" = "yes" ]; then vendor/bin/psalm; fi - -after_script: - - php vendor/bin/coveralls From 34769d7638d345d1504d88a2d2952e48151eb187 Mon Sep 17 00:00:00 2001 From: Kevin Krummnacker Date: Tue, 8 Dec 2020 00:05:24 +0100 Subject: [PATCH 2/4] update composer for php 8 support --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 84d0432..c9dbd5e 100644 --- a/composer.json +++ b/composer.json @@ -19,9 +19,9 @@ }, "require-dev": { "php-coveralls/php-coveralls": "^2.2", - "phpunit/phpunit": "^8", + "phpunit/phpunit": "^8.5.8|^9.3.3", "dominicsayers/isemail": "^3.0.7", - "vimeo/psalm": "^3.11" + "vimeo/psalm": "^4" }, "suggest": { "ext-intl": "PHP Internationalization Libraries are required to use the SpoofChecking validation" From ba0678f73968f255c6befe549781b5e00961fd45 Mon Sep 17 00:00:00 2001 From: Kevin Krummnacker Date: Tue, 8 Dec 2020 00:06:45 +0100 Subject: [PATCH 3/4] add github actions --- .github/workflows/analysis.yml | 45 +++++++++++++++++++++++++++++ .github/workflows/ci.yml | 52 ++++++++++++++++++++++++++++++++++ psalm.baseline.xml | 13 +-------- 3 files changed, 98 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/analysis.yml create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml new file mode 100644 index 0000000..32508e4 --- /dev/null +++ b/.github/workflows/analysis.yml @@ -0,0 +1,45 @@ +name: analysis + +on: [push, pull_request] + +jobs: + + psalm: + name: psalm + + strategy: + matrix: + php-version: [7.2] + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: '7.2' + extensions: intl + coverage: none + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} + restore-keys: | + composer-${{ runner.os }}-${{ matrix.php-version }}- + composer-${{ runner.os }}- + composer- + + - name: Run composer install + run: composer install -n --prefer-dist + + - name: Run psalm + run: ./vendor/bin/psalm --no-progress --output-format=github diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d28f6f2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,52 @@ +name: ci + +on: [push, pull_request] + +jobs: + + tests: + name: ${{ matrix.operating-system }} with PHP ${{ matrix.php-version }} + + strategy: + matrix: + operating-system: + - 'ubuntu-latest' + php-version: + - '7.2' + - '7.3' + - '7.4' + - '8.0' + + runs-on: ${{ matrix.operating-system }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + extensions: intl + php-version: ${{ matrix.php-version }} + + - name: Get composer cache directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} + restore-keys: | + composer-${{ runner.os }}-${{ matrix.php-version }}- + composer-${{ runner.os }}- + composer- + + - name: Download dependencies + run: | + composer update --no-interaction --no-progress --optimize-autoloader + + - name: Run tests with PHPUnit + run: | + vendor/bin/phpunit diff --git a/psalm.baseline.xml b/psalm.baseline.xml index 13a922e..34e1ea2 100644 --- a/psalm.baseline.xml +++ b/psalm.baseline.xml @@ -1,19 +1,8 @@ - + self::$nullToken - - - parse - - - - - Spoofchecker - Spoofchecker - - From 40dc1fbe09bf08e7adc79906c21a887400110b42 Mon Sep 17 00:00:00 2001 From: Kevin Krummnacker Date: Tue, 8 Dec 2020 00:27:02 +0100 Subject: [PATCH 4/4] add scrutinizer.yml file --- .scrutinizer.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .scrutinizer.yml diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 0000000..5025c3a --- /dev/null +++ b/.scrutinizer.yml @@ -0,0 +1,13 @@ +imports: + - php + +build: + environment: + php: '7.2.13' + tests: + override: + - + command: 'vendor/bin/phpunit --coverage-clover=clover.xml' + coverage: + file: 'clover.xml' + format: 'clover'