From b801e176aadaad3c97154be1650986acb371df25 Mon Sep 17 00:00:00 2001 From: Art4 Date: Sun, 22 Dec 2024 14:36:19 +0000 Subject: [PATCH] Merge database and unit tests into one workflow --- .../{database-tests.yml => tests.yml} | 38 ++++++++++++++-- .github/workflows/unit-tests.yml | 44 ------------------- 2 files changed, 35 insertions(+), 47 deletions(-) rename .github/workflows/{database-tests.yml => tests.yml} (75%) delete mode 100644 .github/workflows/unit-tests.yml diff --git a/.github/workflows/database-tests.yml b/.github/workflows/tests.yml similarity index 75% rename from .github/workflows/database-tests.yml rename to .github/workflows/tests.yml index 3ca0985d84..d0aa623842 100644 --- a/.github/workflows/database-tests.yml +++ b/.github/workflows/tests.yml @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: CC0-1.0 -name: Database tests +name: CI tests on: push: @@ -10,8 +10,40 @@ on: workflow_dispatch: jobs: - friendica: - name: Test with PHP ${{ matrix.php-versions }} + unit-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:unit + + database-tests: + name: Database-Tests (PHP ${{ matrix.php-versions }}) runs-on: ubuntu-latest services: diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml deleted file mode 100644 index b0ff7bdca2..0000000000 --- a/.github/workflows/unit-tests.yml +++ /dev/null @@ -1,44 +0,0 @@ -# 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 testsuite (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:unit \ No newline at end of file