Skip to content

Commit 973b170

Browse files
committed
fix(ci): update test workflows for pull requests
see creasico/laravel-project#54 Signed-off-by: Fery Wardiyanto <ferywardiyanto@gmail.com>
1 parent f8842d5 commit 973b170

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

.github/workflows/test.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Tests
33
on:
44
schedule: # scheduled to run at 23.00 on Saturday (UTC), means 6.00 on Monday (WIB)
55
- cron: '0 23 * * 6'
6-
pull_request:
6+
pull_request_target:
77
branches: [main]
88
push:
99
branches: [main]
@@ -65,6 +65,8 @@ jobs:
6565
ini-values: error_reporting=E_ALL
6666
tools: composer:v2
6767
coverage: xdebug
68+
env:
69+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6870

6971
- name: Get Composer cache directory
7072
id: composer-cache
@@ -89,6 +91,7 @@ jobs:
8991
run: composer test -- --coverage
9092

9193
- name: Generate reports for CodeClimate
94+
if: github.actor != 'dependabot[bot]'
9295
env:
9396
COVERAGE_FILE: tests/reports/clover.xml
9497
CODECLIMATE_REPORT: ${{ github.workspace }}/tests/reports/codeclimate.${{ matrix.php }}.json
@@ -98,14 +101,16 @@ jobs:
98101
99102
- name: Upload tests reports
100103
uses: actions/upload-artifact@v3
104+
if: github.actor != 'dependabot[bot]'
101105
with:
102106
name: test-reports
103107
path: tests/reports
104108

105109
reports:
106110
name: Report Test Coverages
107-
needs: tests
111+
if: github.actor != 'dependabot[bot]'
108112
runs-on: ubuntu-latest
113+
needs: tests
109114

110115
steps:
111116
- name: Download test reports

0 commit comments

Comments
 (0)