Skip to content

Commit

Permalink
✅ Adding tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
derteaser committed Nov 4, 2024
1 parent de55810 commit 1a58f4d
Show file tree
Hide file tree
Showing 11 changed files with 3,539 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .env.ci
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
APP_URL=https://www.foerderverein-familienzentrum-einsteinstrasse-neuss.test
APP_DEBUG=false
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
name: Run Pest tests

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: Set up PHP
uses: shivammathur/setup-php@c541c155eee45413f5b09a52248675b1a2575231 # v2
with:
php-version: '8.3'

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@6849a6489940f00c2f30c0fb92c6274307ccb58a # v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: composer install --no-interaction --no-suggest --prefer-dist

- name: Copy .env file
run: cp .env.ci .env

- name: Run tests
run: vendor/bin/pest
16 changes: 15 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,24 @@
"bnomei/kirby3-dotenv": "2.2.0",
"bnomei/kirby3-feed": "1.7.0"
},
"require-dev": {
"pestphp/pest": "3.3.2",
"lukaskleinschmidt/kirby-types": "^2.0"
},
"config": {
"optimize-autoloader": true,
"allow-plugins": {
"getkirby/composer-installer": true
"getkirby/composer-installer": true,
"pestphp/pest-plugin": true
}
},
"scripts": {
"start": [
"Composer\\Config::disableProcessTimeout",
"@php -S localhost:8000 kirby/router.php"
],
"post-autoload-dump": [
"@php post-autoload-dump.php"
]
}
}
Loading

0 comments on commit 1a58f4d

Please sign in to comment.