From 1b0f801607c1315071c4981f8974e38de9088ad6 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 26 Jan 2025 10:07:32 +0800 Subject: [PATCH 1/8] Add GitHub Actions Signed-off-by: Mior Muhammad Zaki --- .github/workflows/tests.yml | 50 +++++++++++++++++++++++++++++++++++++ composer.json | 2 ++ 2 files changed, 52 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..2b54132 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,50 @@ +name: tests + +on: + push: + branches: + - master + - '*.x' + pull_request: + schedule: + - cron: '0 0 * * *' + +permissions: + contents: read + +jobs: + tests: + runs-on: ubuntu-22.04 + + strategy: + fail-fast: true + matrix: + php: [8.1, 8.2, 8.3, 8.4] + laravel: [10, 11] + exclude: + - php: 8.1 + laravel: 11 + - php: 8.4 + laravel: 10 + + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: dom, curl, libxml, mbstring, zip + ini-values: error_reporting=E_ALL + tools: composer:v2 + coverage: none + + - name: Install dependencies + run: | + composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts:^${{ matrix.laravel }}" + + - name: Execute tests + run: vendor/bin/pest diff --git a/composer.json b/composer.json index d6df74c..41f8203 100644 --- a/composer.json +++ b/composer.json @@ -8,6 +8,8 @@ "php": "^8.1", "composer-runtime-api": "^2.2", "fakerphp/faker": "^1.24", + "illuminate/contracts": "^10.48.23|^11.35", + "illuminate/support": "^10.48.23|^11.35", "orchestra/workbench": "^8.17|^9.13", "symfony/polyfill-php83": "^1.31" }, From f41efd849652c00e1cd43edf4ff6bf0ff43945e5 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 26 Jan 2025 10:08:13 +0800 Subject: [PATCH 2/8] wip Signed-off-by: Mior Muhammad Zaki --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 41f8203..135e7d5 100644 --- a/composer.json +++ b/composer.json @@ -38,9 +38,9 @@ "Workbench\\Database\\Seeders\\": "workbench/database/seeders/" } }, - "repositories": [ - { "type": "composer", "url": "https://nova.laravel.com" } - ], + "repositories": { + "nova": { "type": "composer", "url": "https://nova.laravel.com" } + }, "config": { "sort-packages": true, "allow-plugins": { From 757b733187e16ffb0801fa7a993386e9af1e51f2 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 26 Jan 2025 10:10:36 +0800 Subject: [PATCH 3/8] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/tests.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b54132..d4f9713 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,6 +42,18 @@ jobs: tools: composer:v2 coverage: none + - uses: actions/checkout@v4 + name: Checkout private tools + with: + repository: laravel/nova + token: ${{ secrets.MY_GITHUB_TOKEN }} + path: nova + ref: "main" + + - name: Configure repository configuration + run: | + composer config repositories.nova '{"type": "path", "url": "nova"}' --file composer.json + - name: Install dependencies run: | composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts:^${{ matrix.laravel }}" From e8fb8bf0d3b1ac9c72d83bc4f58abba5b3fecdac Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 1 Feb 2025 09:56:41 +0800 Subject: [PATCH 4/8] Update tests.yml --- .github/workflows/tests.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d4f9713..76a3ea3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -57,6 +57,8 @@ jobs: - name: Install dependencies run: | composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts:^${{ matrix.laravel }}" + env: + COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}' - name: Execute tests run: vendor/bin/pest From 5d5c777590e373a643c65e7d5f4e64ecf049b1b6 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 1 Feb 2025 09:57:32 +0800 Subject: [PATCH 5/8] Update tests.yml --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 76a3ea3..687c03b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -46,7 +46,7 @@ jobs: name: Checkout private tools with: repository: laravel/nova - token: ${{ secrets.MY_GITHUB_TOKEN }} + token: ${{ secrets.GITHUB_TOKEN }} path: nova ref: "main" From 5023ebf07e3ab022a21df4b7c1c8ef4304a4cf13 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 1 Feb 2025 09:58:16 +0800 Subject: [PATCH 6/8] Update tests.yml --- .github/workflows/tests.yml | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 687c03b..868df8d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,18 +42,6 @@ jobs: tools: composer:v2 coverage: none - - uses: actions/checkout@v4 - name: Checkout private tools - with: - repository: laravel/nova - token: ${{ secrets.GITHUB_TOKEN }} - path: nova - ref: "main" - - - name: Configure repository configuration - run: | - composer config repositories.nova '{"type": "path", "url": "nova"}' --file composer.json - - name: Install dependencies run: | composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts:^${{ matrix.laravel }}" From ec38d30a8e53065e0736cfbfe188bde552a9ea79 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 2 Feb 2025 09:37:22 +0800 Subject: [PATCH 7/8] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/tests.yml | 2 +- composer.json | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 868df8d..6d3e666 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -44,7 +44,7 @@ jobs: - name: Install dependencies run: | - composer update --prefer-dist --no-interaction --no-progress --with="illuminate/contracts:^${{ matrix.laravel }}" + composer update --no-interaction --no-progress --with="illuminate/contracts:^${{ matrix.laravel }}" env: COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.GITHUB_TOKEN }}"}}' diff --git a/composer.json b/composer.json index 135e7d5..d9cd781 100644 --- a/composer.json +++ b/composer.json @@ -42,10 +42,13 @@ "nova": { "type": "composer", "url": "https://nova.laravel.com" } }, "config": { - "sort-packages": true, "allow-plugins": { "pestphp/pest-plugin": true - } + }, + "preferred-install": { + "*": "auto" + }, + "sort-packages": true }, "extra": { "laravel": { From 777258780ce4bfdb1bce645d6bbab2152f588d67 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Mon, 3 Feb 2025 09:34:42 +0800 Subject: [PATCH 8/8] wip Signed-off-by: Mior Muhammad Zaki --- .github/workflows/tests.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6d3e666..592ffb3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,6 +42,14 @@ jobs: tools: composer:v2 coverage: none + - uses: actions/checkout@v4 + name: Checkout private tools + with: + repository: laravel/nova + token: ${{ secrets.GITHUB_TOKEN }} + path: nova + ref: "main" + - name: Install dependencies run: | composer update --no-interaction --no-progress --with="illuminate/contracts:^${{ matrix.laravel }}"