Skip to content

Commit 1f64ef5

Browse files
committed
Merge branch '140-use-NovaResource-class-in-NovaTestGenerator-instead-of-Model' into 159-ability-to-set-nova-resource-for-nova-tests-generator
2 parents d0cc813 + bdce6e6 commit 1f64ef5

File tree

69 files changed

+1796
-512
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+1796
-512
lines changed

.github/workflows/run-tests-with-coverage.yml

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,52 @@ name: Run tests with coverage
22

33
on:
44
push:
5-
branches: ["master"]
5+
branches: [ "master" ]
66
pull_request:
7-
branches: ["master"]
7+
branches: [ "master" ]
88

99
jobs:
10-
test-with-coverage:
10+
tests-with-coverage:
1111
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
php-version: [ "8.3", "8.4" ]
1215
steps:
13-
- uses: shivammathur/setup-php@v2
16+
- name: Set up PHP
17+
uses: shivammathur/setup-php@v2
1418
with:
15-
php-version: '8.3'
16-
- uses: actions/checkout@v3
17-
- name: Validate composer.json and composer.lock
18-
run: composer validate
19+
php-version: ${{ matrix.php-version }}
20+
coverage: xdebug
21+
tools: composer
22+
- name: Checkout
23+
uses: actions/checkout@v4
1924
- name: Install Dependencies
2025
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
2126
- name: Execute unit tests via PHPUnit with coverage
2227
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
28+
- name: Export coverage report
29+
if: ${{ matrix.php-version == '8.4' }}
30+
uses: actions/upload-artifact@v4
31+
with:
32+
name: clover.xml
33+
path: build/logs
34+
35+
upload-to-coveralls:
36+
needs: tests-with-coverage
37+
runs-on: ubuntu-latest
38+
steps:
39+
- name: Set up PHP
40+
uses: shivammathur/setup-php@v2
41+
- name: Checkout
42+
uses: actions/checkout@v4
43+
- name: Import coverage report
44+
uses: actions/download-artifact@v4
45+
with:
46+
name: clover.xml
47+
path: build/logs
2348
- name: Upload coverage results to Coveralls
2449
env:
2550
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2651
run: |
2752
composer global require php-coveralls/php-coveralls
28-
php-coveralls --coverage_clover=build/logs/clover.xml -v
53+
php-coveralls --coverage_clover=build/logs/clover.xml -v --json_path=coveralls-upload.json

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"RonasIT\\Support\\Tests\\": "tests/",
3737
"RonasIT\\Support\\Tests\\Support\\": "tests/Support/",
3838
"App\\Nova\\": "tests/Support/Nova/",
39-
"Laravel\\Nova\\": "tests/Support/NovaResource"
39+
"Laravel\\Nova\\": "tests/Support/NovaResource/"
4040
},
4141
"files": [
4242
"tests/TestCase.php"

0 commit comments

Comments
 (0)