From a0348752164a9edf6cdbdd4400cbc6582dae5299 Mon Sep 17 00:00:00 2001 From: myrmidex Date: Sun, 6 Jul 2025 10:57:55 +0200 Subject: [PATCH] Add forgejo config --- .forgejo/workflows/ci.yml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .forgejo/workflows/ci.yml diff --git a/.forgejo/workflows/ci.yml b/.forgejo/workflows/ci.yml new file mode 100644 index 0000000..1d5ee3f --- /dev/null +++ b/.forgejo/workflows/ci.yml @@ -0,0 +1,39 @@ +name: CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: '8.2' + extensions: mbstring, xml, bcmath, pdo, sqlite, pdo_sqlite + coverage: none + + - name: Install dependencies + run: composer install --prefer-dist --no-progress + + - name: Run PHPStan + run: ./vendor/bin/phpstan analyse --memory-limit=256M + + - name: Prepare Laravel Application + run: | + cp .env.example .env + php artisan key:generate + php artisan config:clear + + - name: Run PHPUnit Tests + env: + DB_CONNECTION: sqlite + DB_DATABASE: ':memory:' + run: php artisan test \ No newline at end of file