Skip to content

Commit 5677e2d

Browse files
committed
ci: clean up
Signed-off-by: Fery Wardiyanto <ferywardiyanto@gmail.com>
1 parent c5ad62a commit 5677e2d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

.github/workflows/prepare.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ jobs:
3737

3838
- name: Prepare environment
3939
id: prepare
40-
env:
41-
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
4240
run: |
4341
git config user.name "Creasi.HQ" && git config user.email "dev@creasi.co"
4442
echo "composer-cache=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
45-
echo "should-reports=$(if [[ -z \"${CC_TEST_REPORTER_ID}\" ]]; then echo '0'; else echo '1'; fi)" >> $GITHUB_OUTPUT
43+
echo "should-reports=$([[ -z \"$CC_TEST_REPORTER_ID\" ]] && echo '1')" >> $GITHUB_OUTPUT

.github/workflows/test.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,11 @@ jobs:
9696
COVERAGE_FILE: tests/reports/clover.xml
9797
CODECLIMATE_REPORT: ${{ github.workspace }}/tests/reports/codeclimate.${{ matrix.php }}.json
9898
run: |
99-
curl -LSs $CC_TEST_REPORTER_URL > ./cc-test-reporter && chmod +x ./cc-test-reporter
100-
./cc-test-reporter format-coverage -t clover -o $CODECLIMATE_REPORT $COVERAGE_FILE
101-
echo "has-reports=1" >> $GITHUB_OUTPUT
99+
if [[ -z \"$CC_TEST_REPORTER_URL\" ]]; then
100+
curl -LSs $CC_TEST_REPORTER_URL > ./cc-test-reporter && chmod +x ./cc-test-reporter
101+
./cc-test-reporter format-coverage -t clover -o $CODECLIMATE_REPORT $COVERAGE_FILE
102+
echo "has-reports=1" >> $GITHUB_OUTPUT
103+
fi
102104
103105
- name: Upload tests reports
104106
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)