Skip to content

Commit df1a9ea

Browse files
committed
ci: add static analysis
1 parent 53e1e44 commit df1a9ea

File tree

4 files changed

+68
-7
lines changed

4 files changed

+68
-7
lines changed

.github/workflows/static.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Static Analysis
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
static:
9+
if: github.event_name != 'schedule' || github.repository == 'tapperphp/tapper'
10+
name: Static Analysis
11+
12+
runs-on: ubuntu-latest
13+
strategy:
14+
fail-fast: true
15+
matrix:
16+
dependency-version: [prefer-lowest, prefer-stable]
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Setup PHP
23+
uses: shivammathur/setup-php@v2
24+
with:
25+
php-version: 8.3
26+
tools: composer:v2
27+
coverage: none
28+
29+
- name: Install Dependencies
30+
run: composer update --prefer-stable --no-interaction --no-progress --ansi
31+
32+
- name: Code Style
33+
run: composer test:lint

.pest.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" bootstrap="vendor/autoload.php" colors="true">
3+
<testsuites>
4+
<testsuite name="Default">
5+
<directory>tests/</directory>
6+
</testsuite>
7+
</testsuites>
8+
<source>
9+
<include>
10+
<directory>app</directory>
11+
<directory>src</directory>
12+
</include>
13+
</source>
14+
<php>
15+
<env name="APP_ENV" value="testing"/>
16+
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
17+
<env name="BCRYPT_ROUNDS" value="4"/>
18+
<env name="CACHE_STORE" value="array"/>
19+
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
20+
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
21+
<env name="MAIL_MAILER" value="array"/>
22+
<env name="PULSE_ENABLED" value="false"/>
23+
<env name="QUEUE_CONNECTION" value="sync"/>
24+
<env name="SESSION_DRIVER" value="array"/>
25+
<env name="TELESCOPE_ENABLED" value="false"/>
26+
</php>
27+
</phpunit>

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"bin/tapper"
3838
],
3939
"scripts": {
40-
"test:unit": "pest"
40+
"test:unit": "pest --compact",
41+
"test:lint": "pint --test"
4142
}
4243
}

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)