]> git.mxchange.org Git - friendica.git/commitdiff
add tests workflow
authorArt4 <art4@wlabs.de>
Fri, 20 Dec 2024 21:32:59 +0000 (21:32 +0000)
committerArt4 <art4@wlabs.de>
Fri, 20 Dec 2024 21:32:59 +0000 (21:32 +0000)
.github/workflows/tests.yml [new file with mode: 0644]
.github/workflows/unit-tests.yml

diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
new file mode 100644 (file)
index 0000000..5d9297d
--- /dev/null
@@ -0,0 +1,44 @@
+# SPDX-FileCopyrightText: 2010 - 2024 the Friendica project
+#
+# SPDX-License-Identifier: CC0-1.0
+
+name: Unit tests
+
+on:
+  push:
+  pull_request:
+  workflow_dispatch:
+
+jobs:
+
+  tests:
+    name: Unit tests (PHP ${{ matrix.php }})
+    runs-on: ubuntu-latest
+
+    strategy:
+      fail-fast: false
+      matrix:
+        operating-system: ['ubuntu-latest']
+        php: ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']
+
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v3
+        with:
+          fetch-depth: 2
+
+      - name: Setup PHP with composer and extensions
+        uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
+        with:
+          php-version: ${{ matrix.php }}
+          coverage: xdebug
+          tools: none
+
+      - name: Clone addon repository
+        run: git clone -b develop --single-branch https://git.friendi.ca/friendica/friendica-addons.git addon
+
+      - name: Install Composer dependencies
+        uses: "ramsey/composer-install@v2"
+
+      - name: Run Unit tests
+        run: composer run test -- --configuration tests/phpunit.xml -d memory_limit=-1;
\ No newline at end of file
index c360c3d81819c656dbd1e3c0d0546dcd1f7dcd03..841b4bb6e940c7070ad123e3e8534ea59b93f1b7 100644 (file)
@@ -12,7 +12,7 @@ on:
 jobs:
 
   tests:
-    name: Run Unit tests (PHP ${{ matrix.php }})
+    name: Unit tests (PHP ${{ matrix.php }})
     runs-on: ubuntu-latest
 
     strategy: