summaryrefslogtreecommitdiffstats
path: root/.github/workflows/api-php-tests.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/api-php-tests.yml')
-rw-r--r--.github/workflows/api-php-tests.yml25
1 files changed, 18 insertions, 7 deletions
diff --git a/.github/workflows/api-php-tests.yml b/.github/workflows/api-php-tests.yml
index 838522bae..2fb790770 100644
--- a/.github/workflows/api-php-tests.yml
+++ b/.github/workflows/api-php-tests.yml
@@ -9,13 +9,22 @@ jobs:
name: "PHP: Nextcloud ${{ matrix.nextcloud }} - PHP ${{ matrix.php-versions }} - DB ${{ matrix.database }}"
strategy:
matrix:
- php-versions: ['7.4']
- nextcloud: ['stable22']
+ php-versions: ['8.1']
+ nextcloud: ['stable27']
database: ['sqlite']
experimental: [false]
+ codecoverage: [false]
+ include:
+ - php-versions: 8.2
+ nextcloud: stable27
+ database: sqlite
+ experimental: false
+ codecoverage: true
steps:
- name: Checkout
- uses: actions/checkout@v2.3.4
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 2 # https://github.com/codecov/codecov-action/issues/190#issuecomment-790729633
- name: Setup PHP
uses: shivammathur/setup-php@v2
@@ -23,6 +32,8 @@ jobs:
php-version: ${{ matrix.php-versions }}
extensions: pdo_sqlite,pdo_mysql,pdo_pgsql,gd,zip
coverage: pcov
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
### Back to normal setup
- name: Set up server non MySQL
@@ -39,10 +50,7 @@ jobs:
uses: SMillerDev/nextcloud-actions/setup-nextcloud-app@main
with:
app: 'news'
- check-code: true
-
- - name: Setup problem matchers for PHPUnit
- run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
+ check-code: false
- name: Prep PHP tests
working-directory: ../server/apps/news
@@ -50,6 +58,9 @@ jobs:
- name: Unittests
working-directory: ../server/apps/news
run: make unit-test
+ env:
+ CODECOVERAGE: ${{ matrix.codecoverage }}
- name: Upload codecoverage
+ if: ${{ matrix.codecoverage }}
working-directory: ../server/apps/news
run: bash <(curl -s https://codecov.io/bash) -f build/php-unit.clover -N ${{ github.sha }}