Compare commits
1 Commits
master
...
0dcffc50e1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0dcffc50e1 |
@@ -23,23 +23,12 @@ jobs:
|
||||
- name: Validate composer.json
|
||||
run: composer validate
|
||||
|
||||
- uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: '1.20'
|
||||
|
||||
- uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
||||
id: get-hash
|
||||
with:
|
||||
patterns: |-
|
||||
go.sum
|
||||
**/composer.json
|
||||
|
||||
- name: Cache Composer packages
|
||||
id: composer-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: vendor
|
||||
key: ${{ runner.os }}-php-${{ steps.get-hash.outputs.hash }}
|
||||
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-php-
|
||||
|
||||
|
||||
12
Makefile
12
Makefile
@@ -1,17 +1,19 @@
|
||||
EXEC="docker compose exec php"
|
||||
|
||||
up:
|
||||
docker compose up -d
|
||||
|
||||
start: up composer-install
|
||||
|
||||
composer-install:
|
||||
docker compose exec -T php composer install
|
||||
"$(EXEC)" composer install
|
||||
stop:
|
||||
docker compose stop
|
||||
cmd:
|
||||
docker compose exec php sh
|
||||
"$(EXEC)" sh
|
||||
phpstan:
|
||||
docker compose exec -T php vendor/bin/phpstan analyse src --level 8
|
||||
"$(EXEC)" vendor/bin/phpstan analyse src --level 8
|
||||
cs-fix:
|
||||
docker compose exec -T php vendor/bin/php-cs-fixer fix --allow-risky=yes
|
||||
"$(EXEC)" vendor/bin/php-cs-fixer fix --allow-risky=yes
|
||||
test:
|
||||
docker compose exec -T php vendor/bin/pest
|
||||
"$(EXEC)" vendor/bin/pest
|
||||
@@ -7,8 +7,6 @@ cp .env.example .env
|
||||
make start
|
||||
```
|
||||
|
||||
You will now have a webserver running on localhost:443 and localhost:80
|
||||
|
||||
### How to stop
|
||||
```
|
||||
make stop
|
||||
|
||||
@@ -16,4 +16,4 @@ it('view is rendered', function (): void {
|
||||
$body->rewind();
|
||||
|
||||
expect($body->getContents())->toBe('Welkom');
|
||||
});
|
||||
});
|
||||
@@ -8,6 +8,12 @@ use Psr\Http\Message\ResponseInterface;
|
||||
|
||||
function get(string $uri, array $headers = [], array $cookies = []): ResponseInterface
|
||||
{
|
||||
try {
|
||||
app(\App\Core\EnvironmentLoader::class)->load(\App\Enums\Environment::Testing);
|
||||
} catch (\Exception) {
|
||||
app(\App\Core\EnvironmentLoader::class)->load();
|
||||
}
|
||||
|
||||
$router = app(Router::class);
|
||||
$request = new ServerRequest(uri: $uri, method: 'GET', headers: $headers, cookieParams: $cookies);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user