Skip to content

Commit 56c8af2

Browse files
fix: use actions/upload-artifact for GUI test result (#12548)
use actions/upload-artifact Signed-off-by: Prajwol Amatya <prajwolamatya11@gmail.com>
1 parent f668a56 commit 56c8af2

2 files changed

Lines changed: 12 additions & 28 deletions

File tree

.github/workflows/branded-client.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@ on:
77

88
env:
99
NPM_GHERLINT: "@gherlint/gherlint@1.1.0"
10-
S3_PUBLIC_CACHE_SERVER: "https://cache.owncloud.com"
11-
S3_PUBLIC_CACHE_BUCKET: "public"
1210

1311
jobs:
1412
gui-tests:
@@ -76,15 +74,9 @@ jobs:
7674

7775
- name: Upload GUI test result
7876
if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }}
79-
run: |
80-
curl -L https://dl.min.io/client/mc/release/linux-amd64/mc -o /tmp/mc
81-
chmod +x /tmp/mc
82-
/tmp/mc alias set cache ${{ env.S3_PUBLIC_CACHE_SERVER }} ${{ secrets.CACHE_PUBLIC_S3_ACCESS_KEY }} ${{ secrets.CACHE_PUBLIC_S3_SECRET_KEY }}
83-
/tmp/mc cp --recursive test/gui/guiReportUpload cache/${{ env.S3_PUBLIC_CACHE_BUCKET }}/${{ github.repository }}/${{ github.run_number }}/ocis
84-
85-
- name: Log GUI reports
86-
if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }}
87-
env:
88-
REPORT_DIR: /__w/client/client/test/gui/guiReportUpload
89-
SERVER_TYPE: ocis
90-
run: bash test/gui/ci/log_reports.sh ${REPORT_DIR} ${GITHUB_REPO} ${GITHUB_RUN_NUMBER} ${SERVER_TYPE}
77+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
78+
with:
79+
name: gui-report-branded-client-${{ github.run_number }}
80+
path: test/gui/guiReportUpload
81+
if-no-files-found: warn
82+
retention-days: 7

.github/workflows/gui-tests.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ on:
1010

1111
env:
1212
NPM_GHERLINT: "@gherlint/gherlint@1.1.0"
13-
S3_PUBLIC_CACHE_SERVER: "https://cache.owncloud.com"
14-
S3_PUBLIC_CACHE_BUCKET: "public"
1513

1614
jobs:
1715
lint-gui-test:
@@ -146,15 +144,9 @@ jobs:
146144

147145
- name: Upload GUI test result
148146
if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }}
149-
run: |
150-
curl -L https://dl.min.io/client/mc/release/linux-amd64/mc -o /tmp/mc
151-
chmod +x /tmp/mc
152-
/tmp/mc alias set cache ${{ env.S3_PUBLIC_CACHE_SERVER }} ${{ secrets.CACHE_PUBLIC_S3_ACCESS_KEY }} ${{ secrets.CACHE_PUBLIC_S3_SECRET_KEY }}
153-
/tmp/mc cp --recursive test/gui/guiReportUpload cache/${{ env.S3_PUBLIC_CACHE_BUCKET }}/${{ github.repository }}/${{ github.run_number }}/ocis
154-
155-
- name: Log GUI reports
156-
if: ${{ failure() && steps.run_gui_test.outcome == 'failure' }}
157-
env:
158-
REPORT_DIR: /__w/client/client/test/gui/guiReportUpload
159-
SERVER_TYPE: ocis
160-
run: bash test/gui/ci/log_reports.sh ${REPORT_DIR} ${GITHUB_REPO} ${GITHUB_RUN_NUMBER} ${SERVER_TYPE}
147+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
148+
with:
149+
name: gui-report-ocis-${{ github.run_number }}
150+
path: test/gui/guiReportUpload
151+
if-no-files-found: warn
152+
retention-days: 7

0 commit comments

Comments
 (0)