Skip to content

Commit

Permalink
use pipeline for retry
Browse files Browse the repository at this point in the history
Signed-off-by: nabim777 <nabinalemagar019@gmail.com>
  • Loading branch information
nabim777 committed Aug 29, 2024
1 parent 8326add commit 96ae684
Showing 1 changed file with 7 additions and 23 deletions.
30 changes: 7 additions & 23 deletions .github/workflows/shared_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ jobs:
- name: Style Lint
run: npm run stylelint

- name: PHP Unit Tests
- name: PHP & Vue Unit Tests
run: |
git clone --depth 1 https://github.com/nextcloud/groupfolders.git -b ${{ matrix.nextcloudVersion }} server/apps/groupfolders
mkdir -p server/apps/integration_openproject
Expand All @@ -110,28 +110,12 @@ jobs:
./occ a:e groupfolders
./occ a:e integration_openproject
cd apps/integration_openproject
pwd
ls -l
- name: Re Run PHPUnit Tests
uses: nick-fields/retry@v3
with:
max_attempts: 2
timeout_minutes: 5
command: |
pwd
ls -l
echo "Starting PHPUnit tests. Attempt ${{ steps.retry.outputs.attempt_number }}"
if [ "${{ matrix.phpVersion }}" -eq 8 ]; then
make phpunitforphp8.0
else
make phpunit
fi
- name: Vue Unit Tests
run: |
pwd
ls -l
# The following if block can be removed once Nextcloud no longer supports PHP 8.0
if [ "${{ matrix.phpVersion }}" -eq 8 ]; then
make phpunitforphp8.0 || (echo "First attempt failed. Retrying PHPUnit tests..." && make phpunitforphp8.0)
else
make phpunit || (echo "First attempt failed. Retrying PHPUnit tests..." && make phpunit)
fi
make jsunit
- name: JS Code Coverage Summary Report
Expand Down

0 comments on commit 96ae684

Please sign in to comment.