From 9f8d966ab5b06fa24a480ca2bb5f30950cd4bc03 Mon Sep 17 00:00:00 2001 From: Nemanja Andrejevic Date: Tue, 23 May 2023 10:13:52 +0200 Subject: [PATCH 1/7] IT-10204: Adding GHA for PHP 7.3 and PHP 8.1 tests --- workflows/pr-build-php73.yml | 48 ++++++++++++++++++++++++++++++++++++ workflows/pr-build-php81.yml | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) create mode 100644 workflows/pr-build-php73.yml create mode 100644 workflows/pr-build-php81.yml diff --git a/workflows/pr-build-php73.yml b/workflows/pr-build-php73.yml new file mode 100644 index 0000000..08bda8c --- /dev/null +++ b/workflows/pr-build-php73.yml @@ -0,0 +1,48 @@ +name: PHP 7.3 tests + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Setup PHP with specific version of PECL extension + uses: shivammathur/setup-php@v2 + with: + php-version: '7.3' + + - name: Setup authentication + run: | + composer config --global --auth http-basic.repo.packagist.com token ${{ secrets.PACKGIST_TOKEN }} + + - uses: actions/checkout@v3 + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Install dependencies + run: composer show + + - name: Run test suite + run: vendor/bin/phpunit diff --git a/workflows/pr-build-php81.yml b/workflows/pr-build-php81.yml new file mode 100644 index 0000000..c115d69 --- /dev/null +++ b/workflows/pr-build-php81.yml @@ -0,0 +1,48 @@ +name: PHP 8.1 tests + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +permissions: + contents: read + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Setup PHP with specific version of PECL extension + uses: shivammathur/setup-php@v2 + with: + php-version: '8.1' + + - name: Setup authentication + run: | + composer config --global --auth http-basic.repo.packagist.com token ${{ secrets.PACKGIST_TOKEN }} + + - uses: actions/checkout@v3 + + - name: Validate composer.json and composer.lock + run: composer validate + + - name: Cache Composer packages + id: composer-cache + uses: actions/cache@v3 + with: + path: vendor + key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} + restore-keys: | + ${{ runner.os }}-php- + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Install dependencies + run: composer show + + - name: Run test suite + run: vendor/bin/phpunit From 368cc279ca20554101d5860e2e1cd4c601f7bf5d Mon Sep 17 00:00:00 2001 From: Nemanja Andrejevic Date: Tue, 23 May 2023 10:35:15 +0200 Subject: [PATCH 2/7] IT-10204: Replacing Faker with new repo --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d837622..f5f17d2 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "require-dev": { "phpunit/phpunit": ">=4.7", "arbor-education/php-coding-standard": ">=1", - "fzaninotto/faker": "^1.9" + "fakerphp/faker": "^1" }, "autoload": { "psr-0": { From feb56a4473cb9b1dab515bc17d89e631909a4c9b Mon Sep 17 00:00:00 2001 From: Nemanja Andrejevic Date: Tue, 23 May 2023 10:44:13 +0200 Subject: [PATCH 3/7] IT-10204: Replacing Faker with new repo --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index f5f17d2..3d67aec 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ "require-dev": { "phpunit/phpunit": ">=4.7", "arbor-education/php-coding-standard": ">=1", - "fakerphp/faker": "^1" + "fakerphp/faker": "^v1.19.0" }, "autoload": { "psr-0": { From 608ca5170041f4221749bb9120b37bc52571ad7a Mon Sep 17 00:00:00 2001 From: Nemanja Andrejevic Date: Wed, 24 May 2023 09:03:29 +0200 Subject: [PATCH 4/7] IT-10204: Switching to Matrix configuration --- workflows/pr-build-php81.yml | 48 ------------------- .../{pr-build-php73.yml => pr-build.yml} | 6 ++- 2 files changed, 4 insertions(+), 50 deletions(-) delete mode 100644 workflows/pr-build-php81.yml rename workflows/{pr-build-php73.yml => pr-build.yml} (89%) diff --git a/workflows/pr-build-php81.yml b/workflows/pr-build-php81.yml deleted file mode 100644 index c115d69..0000000 --- a/workflows/pr-build-php81.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: PHP 8.1 tests - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -permissions: - contents: read - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: Setup PHP with specific version of PECL extension - uses: shivammathur/setup-php@v2 - with: - php-version: '8.1' - - - name: Setup authentication - run: | - composer config --global --auth http-basic.repo.packagist.com token ${{ secrets.PACKGIST_TOKEN }} - - - uses: actions/checkout@v3 - - - name: Validate composer.json and composer.lock - run: composer validate - - - name: Cache Composer packages - id: composer-cache - uses: actions/cache@v3 - with: - path: vendor - key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} - restore-keys: | - ${{ runner.os }}-php- - - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Install dependencies - run: composer show - - - name: Run test suite - run: vendor/bin/phpunit diff --git a/workflows/pr-build-php73.yml b/workflows/pr-build.yml similarity index 89% rename from workflows/pr-build-php73.yml rename to workflows/pr-build.yml index 08bda8c..1287b3b 100644 --- a/workflows/pr-build-php73.yml +++ b/workflows/pr-build.yml @@ -11,14 +11,16 @@ permissions: jobs: build: - + strategy: + matrix: + phpVersion: ['7.3', '7.4', '8.1'] runs-on: ubuntu-latest steps: - name: Setup PHP with specific version of PECL extension uses: shivammathur/setup-php@v2 with: - php-version: '7.3' + php-version: ${{ matrix.phpVersion }} - name: Setup authentication run: | From e252842476fb4640486738f4f2dca8835dbf6c30 Mon Sep 17 00:00:00 2001 From: Nemanja Andrejevic Date: Wed, 24 May 2023 09:24:32 +0200 Subject: [PATCH 5/7] IT-10204: Switching to Matrix configuration --- workflows/pr-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/pr-build.yml b/workflows/pr-build.yml index 1287b3b..87727f9 100644 --- a/workflows/pr-build.yml +++ b/workflows/pr-build.yml @@ -1,4 +1,4 @@ -name: PHP 7.3 tests +name: PHP tests on: push: From 6b5ac06f2bb5d94f30e0dd2a6bc5c1c0ba2be551 Mon Sep 17 00:00:00 2001 From: Nemanja Andrejevic Date: Thu, 25 May 2023 12:01:09 +0200 Subject: [PATCH 6/7] Update pr-build.yml --- workflows/pr-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/workflows/pr-build.yml b/workflows/pr-build.yml index 87727f9..9c55301 100644 --- a/workflows/pr-build.yml +++ b/workflows/pr-build.yml @@ -4,7 +4,6 @@ on: push: branches: [ "master" ] pull_request: - branches: [ "master" ] permissions: contents: read From de4e15411a7c543ff137a7067f2e80e5819319fd Mon Sep 17 00:00:00 2001 From: Nemanja Andrejevic Date: Thu, 25 May 2023 12:18:46 +0200 Subject: [PATCH 7/7] Update pr-build.yml --- workflows/pr-build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/workflows/pr-build.yml b/workflows/pr-build.yml index 9c55301..30f995f 100644 --- a/workflows/pr-build.yml +++ b/workflows/pr-build.yml @@ -4,6 +4,7 @@ on: push: branches: [ "master" ] pull_request: + types: [opened, reopened] permissions: contents: read