-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated the testing strategies to larastan, rector and pint and added…
… scripts to composer for ease of access [i got the insperation from the pinkary project].
- Loading branch information
1 parent
915601b
commit 615bf29
Showing
5 changed files
with
66 additions
and
76 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,37 @@ | ||
name: run-tests | ||
name: Tests | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.php' | ||
- '.github/workflows/run-tests.yml' | ||
- 'phpunit.xml.dist' | ||
- 'composer.json' | ||
- 'composer.lock' | ||
on: ['push', 'pull_request'] | ||
|
||
jobs: | ||
test: | ||
ci: | ||
runs-on: ${{ matrix.os }} | ||
timeout-minutes: 5 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
php: [8.3, 8.2] | ||
laravel: [11.*] | ||
stability: [prefer-stable] | ||
include: | ||
- laravel: 11.* | ||
testbench: 9.* | ||
carbon: ^2.63 | ||
os: [ubuntu-latest] # (macos-latest, windows-latest) 3.x-dev is under development | ||
php: ['8.3'] | ||
dependency-version: [prefer-lowest, prefer-stable] | ||
parallel: ['', '--parallel'] | ||
|
||
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} | ||
name: PHP ${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.dependency-version }} - ${{ matrix.parallel }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Setup problem matchers | ||
- name: Setup Problem Matches | ||
run: | | ||
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | ||
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
- name: Install dependencies | ||
run: | | ||
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:${{ matrix.os == 'windows-latest' && '^^^' || '' }}${{ matrix.carbon }}" --no-interaction --no-update | ||
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | ||
- name: List Installed Dependencies | ||
run: composer show -D | ||
- name: Install PHP dependencies | ||
run: composer update --${{ matrix.dependency-version }} --no-interaction --no-progress --ansi | ||
|
||
- name: Execute tests | ||
run: vendor/bin/pest --ci | ||
- name: Unit Tests | ||
run: composer test:unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: Static Analysis | ||
|
||
on: ['push', 'pull_request'] | ||
|
||
jobs: | ||
static: | ||
name: Static Tests | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
dependency-version: [prefer-lowest, prefer-stable] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
tools: composer:v2 | ||
coverage: none | ||
|
||
- name: Install Dependencies | ||
run: composer update --prefer-stable --no-interaction --no-progress --ansi | ||
|
||
- name: Types | ||
run: composer test:types | ||
|
||
- name: Style | ||
run: composer test:lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters