From acf0946ade7ac170339c9690af85c2eec2740815 Mon Sep 17 00:00:00 2001 From: Petr Bartos Date: Tue, 12 Dec 2023 16:36:06 +0100 Subject: [PATCH 1/4] Generate Ibutsu report on release --- .github/workflows/reporter.yml | 33 ++++++++++++++++++++++++++++++ package-lock.json | 37 ++++++++++++++++++++++++++-------- package.json | 2 +- 3 files changed, 63 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/reporter.yml diff --git a/.github/workflows/reporter.yml b/.github/workflows/reporter.yml new file mode 100644 index 000000000..56eb6a571 --- /dev/null +++ b/.github/workflows/reporter.yml @@ -0,0 +1,33 @@ +name: Upload results to Ibutsu +on: + pull_request: + branches: + - master + types: + [closed] +jobs: + upload: + if: | + contains(github.event.pull_request.labels.*.name, 'release') || + contains(github.event.pull_request.labels.*.name, 'release minor') + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v4 + - name: Install required dependencies + run: npm ci + - name: Run the tests + run: cd ${{ github.workspace }}/packages/components && npm run test:ct && npx merge-results -c cypress.config.ts + - name: Login to Quay + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USERNAME }} + password: ${{ secrets.QUAY_PASSWORD }} + - name: Pull the uploader image + run: podman pull quay.io/cloudservices/iqe-artifact-uploader-s3:latest + - name: Upload the results + run: | + podman run -e AWS_BUCKET=${{ secrets.AWS_BUCKET }} -e AWS_REGION=${{ secrets.AWS_REGION }} \ + -e AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} -e AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} \ + -v ${{ github.workspace }}/ibutsu-report:/results quay.io/cloudservices/iqe-artifact-uploader-s3:latest . diff --git a/package-lock.json b/package-lock.json index 6504fda28..7ba875daf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -99,7 +99,7 @@ "jest-canvas-mock": "^2.4.0", "jest-environment-jsdom": "^29.6.2", "lerna": "^5.6.2", - "mocha-ibutsu-reporter": "^0.0.1", + "mocha-ibutsu-reporter": "^0.0.2", "mutation-observer": "^1.0.3", "node-sass-package-importer": "^5.3.2", "prettier": "^2.7.1", @@ -30199,14 +30199,15 @@ } }, "node_modules/mocha-ibutsu-reporter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/mocha-ibutsu-reporter/-/mocha-ibutsu-reporter-0.0.1.tgz", - "integrity": "sha512-MN3pt5i/mUxOvwBfQc5KzPM2J2thqHwTabL50HVoL/OhBr6udTVYweKtS/D5MeQhQRQ7WKTTjpDUhXZRihdHqg==", + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/mocha-ibutsu-reporter/-/mocha-ibutsu-reporter-0.0.2.tgz", + "integrity": "sha512-wpT3N3KhO2wnpyr/t9V833y2ApDrHPtNpJ+iS3rKD8frf8cMzX5g4sSvXyXwOOJ8ylyCk4zDqhW8fBniiqfwOA==", "dev": true, "dependencies": { "commander": "^10.0.0", "md5": "^2.3.0", "mkdirp": "^2.1.3", + "uuid": "^9.0.0", "xml": "^1.0.0", "xml-js": "^1.6.11" }, @@ -30241,6 +30242,19 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/mocha-ibutsu-reporter/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/mocha/node_modules/ansi-colors": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", @@ -43650,7 +43664,7 @@ }, "packages/types": { "name": "@redhat-cloud-services/types", - "version": "1.0.5", + "version": "1.0.6", "license": "Apache-2.0", "devDependencies": { "@patternfly/quickstarts": "^5.0.0", @@ -66523,14 +66537,15 @@ } }, "mocha-ibutsu-reporter": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/mocha-ibutsu-reporter/-/mocha-ibutsu-reporter-0.0.1.tgz", - "integrity": "sha512-MN3pt5i/mUxOvwBfQc5KzPM2J2thqHwTabL50HVoL/OhBr6udTVYweKtS/D5MeQhQRQ7WKTTjpDUhXZRihdHqg==", + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/mocha-ibutsu-reporter/-/mocha-ibutsu-reporter-0.0.2.tgz", + "integrity": "sha512-wpT3N3KhO2wnpyr/t9V833y2ApDrHPtNpJ+iS3rKD8frf8cMzX5g4sSvXyXwOOJ8ylyCk4zDqhW8fBniiqfwOA==", "dev": true, "requires": { "commander": "^10.0.0", "md5": "^2.3.0", "mkdirp": "^2.1.3", + "uuid": "^9.0.0", "xml": "^1.0.0", "xml-js": "^1.6.11" }, @@ -66546,6 +66561,12 @@ "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-2.1.6.tgz", "integrity": "sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A==", "dev": true + }, + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true } } }, diff --git a/package.json b/package.json index 84a5b119b..58698604a 100644 --- a/package.json +++ b/package.json @@ -107,7 +107,7 @@ "jest-canvas-mock": "^2.4.0", "jest-environment-jsdom": "^29.6.2", "lerna": "^5.6.2", - "mocha-ibutsu-reporter": "^0.0.1", + "mocha-ibutsu-reporter": "^0.0.2", "mutation-observer": "^1.0.3", "node-sass-package-importer": "^5.3.2", "prettier": "^2.7.1", From c22c95187666971d1014f6c1ec3611d269ed28ba Mon Sep 17 00:00:00 2001 From: Brandon Tweed Date: Tue, 12 Dec 2023 11:48:37 -0600 Subject: [PATCH 2/4] Add workflow dispatch event for testing --- .github/workflows/reporter.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/reporter.yml b/.github/workflows/reporter.yml index 56eb6a571..6b021e8e8 100644 --- a/.github/workflows/reporter.yml +++ b/.github/workflows/reporter.yml @@ -5,6 +5,7 @@ on: - master types: [closed] + workflow_dispatch: jobs: upload: if: | From 4050f34276989e8029955dea72e08d0938499a54 Mon Sep 17 00:00:00 2001 From: Brandon Tweed Date: Tue, 12 Dec 2023 11:50:33 -0600 Subject: [PATCH 3/4] WIP --- .github/workflows/reporter.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/reporter.yml b/.github/workflows/reporter.yml index 6b021e8e8..2a8a2c9fb 100644 --- a/.github/workflows/reporter.yml +++ b/.github/workflows/reporter.yml @@ -1,11 +1,11 @@ name: Upload results to Ibutsu -on: - pull_request: - branches: - - master - types: - [closed] - workflow_dispatch: +on: workflow_dispatch +# pull_request: +# branches: +# - master +# types: +# [closed] +# workflow_dispatch: jobs: upload: if: | From 75841db5ca934d0f63da7c9cbdb8046bc26a8e24 Mon Sep 17 00:00:00 2001 From: Brandon Tweed Date: Tue, 12 Dec 2023 11:58:01 -0600 Subject: [PATCH 4/4] WIP --- .github/workflows/reporter.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/reporter.yml b/.github/workflows/reporter.yml index 2a8a2c9fb..b43f3a166 100644 --- a/.github/workflows/reporter.yml +++ b/.github/workflows/reporter.yml @@ -1,5 +1,6 @@ name: Upload results to Ibutsu -on: workflow_dispatch +on: + workflow_dispatch: # pull_request: # branches: # - master