Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
48 changes: 48 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Golden-Master-Tests direkt auf dem Runner (ohne Docker), siehe TESTING.md
name: Tests

on:
push:
pull_request:
workflow_dispatch:

jobs:
golden-master:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.0', '8.1', '8.2', '8.3', '8.4']
name: PHP ${{ matrix.php }}

steps:
- uses: actions/checkout@v4

# faketime fixiert die Zeit (Kalender, "heute"-Markierungen) wie im Docker-Image
- name: faketime installieren
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends faketime

- name: PHP einrichten
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: gd
# wie das offizielle Docker-Image: keine php.ini, nur Standardwerte
ini-file: none
coverage: none
tools: composer:v2

- name: Composer-Cache
uses: actions/cache@v4
with:
path: ~/.composer/cache
key: composer-${{ matrix.php }}-${{ hashFiles('composer.lock') }}
restore-keys: composer-${{ matrix.php }}-

- name: Abhaengigkeiten installieren
run: composer install --no-interaction --no-progress --prefer-dist

- name: Tests
env:
GOLDEN_MODE: compare
run: vendor/bin/phpunit
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
vendor/
.original/
.phpunit.result.cache
lmo/vendor/
coverage/
278 changes: 278 additions & 0 deletions TESTING.md

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"name": "lmo/lmo-php8-tests",
"description": "Entwicklungswerkzeuge (Golden-Master-Tests) fuer lmo_php8",
"type": "project",
"license": "GPL-2.0-or-later",
"require": {
"php": ">=8.0"
},
"require-dev": {
"phpunit/phpunit": "^9.6"
},
"autoload-dev": {
"psr-4": {
"Lmo\\Tests\\GoldenMaster\\": "tests/GoldenMaster/"
}
},
"scripts": {
"test": "phpunit",
"test:record": "GOLDEN_MODE=record phpunit"
},
"config": {
"platform": {
"php": "8.0.30"
},
"sort-packages": true
}
}
Loading
Loading