untested... test: add unit test suite and CI workflow
I have never done this style of test before... who knows if it will work - Add Gitea Actions workflow for PHP 8.2 testing - Add PHPUnit configuration and bootstrap file - Add unit tests for TalkService, WebhookController, ImageCleanup, NavigationProvider, and DebugToggle - Add README documentation for the test suite - Update composer.json with test and lint scripts
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
pull_request:
|
||||
branches:
|
||||
- '**'
|
||||
|
||||
jobs:
|
||||
php-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.2'
|
||||
extensions: json, xml, mbstring
|
||||
coverage: none
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: ./nc_bot_webhooks
|
||||
run: composer install --prefer-dist
|
||||
|
||||
- name: Lint PHP files
|
||||
working-directory: ./nc_bot_webhooks
|
||||
run: composer lint
|
||||
|
||||
- name: Run tests
|
||||
working-directory: ./nc_bot_webhooks
|
||||
run: composer test
|
||||
Reference in New Issue
Block a user