Skip to content

Commit 81944cf

Browse files
committed
Refresh toolkit
1 parent cc82599 commit 81944cf

7 files changed

Lines changed: 94 additions & 6 deletions

File tree

.github/workflows/analyze.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939
with:
4040
php-version: ${{ matrix.php-versions }}
4141
tools: composer, pecl, phpunit
42-
extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3
42+
extensions: intl, json, mbstring, gd, mysqlnd, xdebug, xml, sqlite3
43+
env:
44+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4345

4446
- name: Get composer cache directory
4547
id: composer-cache
@@ -65,7 +67,12 @@ jobs:
6567
key: ${{ runner.os }}-phpstan-${{ github.sha }}
6668
restore-keys: ${{ runner.os }}-phpstan-
6769

68-
- name: Install dependencies
70+
- name: Install dependencies (limited)
71+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
72+
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
73+
74+
- name: Install dependencies (authenticated)
75+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
6976
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
7077
env:
7178
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

.github/workflows/compare.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# When a PR is opened or a push is made, compare
2+
# code for backwards compatibility.
3+
name: RoaveBC
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- develop
9+
paths:
10+
- 'src/**'
11+
push:
12+
branches:
13+
- develop
14+
paths:
15+
- 'src/**'
16+
17+
jobs:
18+
compare:
19+
name: Compare for Backwards Compatibility
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Run comparison (limited)
27+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
28+
uses: docker://nyholm/roave-bc-check-ga
29+
30+
- name: Run comparison (authenticated)
31+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
32+
uses: docker://nyholm/roave-bc-check-ga
33+
env:
34+
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

.github/workflows/test.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
tools: composer, pecl, phpunit
3232
extensions: intl, json, mbstring, gd, mysqlnd, xdebug, xml, sqlite3
3333
coverage: xdebug
34+
env:
35+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3436

3537
- name: Get composer cache directory
3638
id: composer-cache
@@ -43,11 +45,19 @@ jobs:
4345
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
4446
restore-keys: ${{ runner.os }}-composer-
4547

46-
- name: Install dependencies
48+
- name: Install dependencies (limited)
49+
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
50+
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
51+
52+
- name: Install dependencies (authenticated)
53+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
4754
run: composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
4855
env:
4956
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
5057

58+
- name: Enable Tachycardia
59+
run: echo "TACHYCARDIA_MONITOR_GA=enabled" >> $GITHUB_ENV
60+
5161
- name: Test with PHPUnit
5262
run: vendor/bin/phpunit --verbose --coverage-text
5363
env:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"codeigniter4/codeigniter4": "dev-develop",
3939
"codeigniter4/codeigniter4-standard": "^1.0",
4040
"myth/auth": "dev-develop",
41-
"tatter/tools": "^1.6"
41+
"tatter/tools": "^1.8"
4242
},
4343
"autoload": {
4444
"psr-4": {

phpstan.neon.dist

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ parameters:
1717
- '#Unsafe usage of new static\(\)*#'
1818
- '#Call to an undefined static method Config\\Services::authentication\(\)#'
1919
- '#Function Patchwork\\redefine not found#'
20+
universalObjectCratesClasses:
21+
- CodeIgniter\Entity
22+
- Faker\Generator
2023
scanDirectories:
2124
- vendor/codeigniter4/codeigniter4/system/Helpers
2225
- vendor/myth/auth/src/Helpers

phpunit.xml.dist

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
34
bootstrap="vendor/codeigniter4/codeigniter4/system/Test/bootstrap.php"
45
backupGlobals="false"
6+
beStrictAboutCoversAnnotation="true"
7+
beStrictAboutOutputDuringTests="true"
8+
beStrictAboutTodoAnnotatedTests="true"
59
colors="true"
610
convertErrorsToExceptions="true"
711
convertNoticesToExceptions="true"
812
convertWarningsToExceptions="true"
913
executionOrder="random"
10-
stopOnError="false"
14+
failOnRisky="true"
15+
failOnWarning="true"
16+
stopOnError="true"
1117
stopOnFailure="false"
1218
stopOnIncomplete="false"
1319
stopOnSkipped="false"
14-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
20+
verbose="true">
1521

1622
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
1723
<include>
@@ -36,6 +42,30 @@
3642
</testsuite>
3743
</testsuites>
3844

45+
<extensions>
46+
<extension class="Nexus\PHPUnit\Extension\Tachycardia">
47+
<arguments>
48+
<array>
49+
<element key="timeLimit">
50+
<double>0.50</double>
51+
</element>
52+
<element key="reportable">
53+
<integer>30</integer>
54+
</element>
55+
<element key="precision">
56+
<integer>2</integer>
57+
</element>
58+
<element key="collectBare">
59+
<boolean>true</boolean>
60+
</element>
61+
<element key="tabulate">
62+
<boolean>true</boolean>
63+
</element>
64+
</array>
65+
</arguments>
66+
</extension>
67+
</extensions>
68+
3969
<logging>
4070
<testdoxHtml outputFile="build/phpunit/testdox.html"/>
4171
<testdoxText outputFile="build/phpunit/testdox.txt"/>
@@ -59,6 +89,7 @@
5989
<env name="COMPOSER_DISABLE_XDEBUG_WARN" value="1"/>
6090

6191
<!-- Database configuration -->
92+
<env name="database.tests.strictOn" value="true"/>
6293
<!-- Uncomment to use alternate testing database configuration
6394
<env name="database.tests.hostname" value="localhost"/>
6495
<env name="database.tests.database" value="tests"/>

roave-bc-check.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
parameters:
2+
ignoreErrors:
3+
- '#\[BC\] SKIPPED: .+ could not be found in the located source#'

0 commit comments

Comments
 (0)