mirror of
https://github.com/LibreSign/libresign.git
synced 2025-12-17 21:12:16 +01:00
fix: only run when is a PR to main branch
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
This commit is contained in:
parent
9bcaa07336
commit
941233f4c6
1 changed files with 8 additions and 5 deletions
13
.github/workflows/phpunit-sqlite.yml
vendored
13
.github/workflows/phpunit-sqlite.yml
vendored
|
|
@ -75,6 +75,12 @@ jobs:
|
|||
name: SQLite PHP ${{ matrix.php-versions }} Nextcloud ${{ matrix.server-versions }}
|
||||
|
||||
steps:
|
||||
- name: Abort if not PR to main with coverage
|
||||
if: ${{ matrix.xdebug_mode == 'coverage' && github.event.pull_request.base.ref != 'main' }}
|
||||
run: |
|
||||
echo "Coverage only runs on PRs to main"
|
||||
exit 0
|
||||
|
||||
- name: Set app env
|
||||
if: ${{ env.APP_NAME == '' }}
|
||||
run: |
|
||||
|
|
@ -165,6 +171,7 @@ jobs:
|
|||
run: composer run test:coverage
|
||||
|
||||
- name: Upload coverage results to Coveralls
|
||||
if: matrix.xdebug_mode == 'coverage'
|
||||
working-directory: apps/${{ env.APP_NAME }}
|
||||
env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
|
@ -202,10 +209,6 @@ jobs:
|
|||
echo 'Neither PHPUnit nor PHPUnit integration tests are specified in composer.json scripts'
|
||||
exit 1
|
||||
|
||||
- name: Set xdebug_mode output
|
||||
id: set-xdebug-mode
|
||||
run: echo "xdebug_mode=${{ matrix.xdebug_mode }}" >> $GITHUB_OUTPUT
|
||||
|
||||
summary:
|
||||
permissions:
|
||||
contents: none
|
||||
|
|
@ -221,7 +224,7 @@ jobs:
|
|||
run: if ${{ needs.changes.outputs.src != 'false' && needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi
|
||||
|
||||
finish-coverage:
|
||||
if: ${{ needs.phpunit-sqlite.outputs.xdebug_mode == 'coverage' }}
|
||||
if: ${{ github.event.pull_request.base.ref == 'main' }}
|
||||
needs: phpunit-sqlite
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue