From 87650efe0adfa14414df457ad102c05b92b4b05e Mon Sep 17 00:00:00 2001 From: Alexey Kopytko Date: Tue, 26 Sep 2023 11:56:48 +0900 Subject: [PATCH 1/3] Add GitHub Actions-based CI --- .github/workflows/php.yml | 54 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/php.yml diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..053bf7b --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,54 @@ +# yamllint disable rule:line-length +# yamllint disable rule:braces + +name: CI + +on: + pull_request: + push: + branches: + - main + - master + +jobs: + build: + name: Test with PHP ${{ matrix.php-version }} + runs-on: ubuntu-latest + + strategy: + matrix: + php-version: + - "7.4" + - "8.0" + - "8.1" + - "8.2" + + steps: + - uses: actions/checkout@v3 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + coverage: none + + - name: Cache Composer packages + uses: actions/cache@v3 + with: + path: ~/.cache/composer + key: composer-${{ matrix.php-version }}-${{ hashFiles('composer.*') }} + restore-keys: | + composer-${{ matrix.php-version }}- + composer- + + - name: Install dependencies + run: | + composer install --prefer-dist --no-progress + + - name: PHP Parallel Lint + run: | + php vendor/bin/parallel-lint --exclude vendor . + + - name: PHPUnit + run: | + php vendor/bin/phpunit From 7494c11be0cf55a412cb8d077bd2116f18c9367f Mon Sep 17 00:00:00 2001 From: Alexey Kopytko Date: Tue, 26 Sep 2023 11:58:28 +0900 Subject: [PATCH 2/3] Update .gitattributes --- .gitattributes | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitattributes b/.gitattributes index 0af3009..e97f8e0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,7 +1,3 @@ -.coveralls.yml export-ignore -.gitattributes export-ignore -.gitignore export-ignore -.travis.yml export-ignore -composer.json export-ignore +.* export-ignore phpunit.xml.dist export-ignore tests export-ignore From 062de8c329905513509aa99513145131df3636f3 Mon Sep 17 00:00:00 2001 From: Alexey Kopytko Date: Tue, 26 Sep 2023 11:58:50 +0900 Subject: [PATCH 3/3] Add missing dependency --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c2f875c..112c577 100644 --- a/composer.json +++ b/composer.json @@ -18,7 +18,8 @@ }, "require-dev": { "phpunit/phpunit": "^6.5 || ^7.5 || ^8.5 || ^9.4", - "php-coveralls/php-coveralls": "^2.0" + "php-coveralls/php-coveralls": "^2.0", + "php-parallel-lint/php-parallel-lint": "^1.3" }, "autoload": { "psr-4": { "Pleo\\BloomFilter\\": "src/" }