From ee537ea07353eeb6172423fa656a17c7c66055db Mon Sep 17 00:00:00 2001 From: Harmeet221 Date: Fri, 10 Oct 2025 15:33:21 +0530 Subject: [PATCH 1/7] test: allure report --- .github/workflows/ci-test-allure.yml | 146 +++++++++++++++++++++++++++ apps/meteor/package.json | 4 + apps/meteor/playwright.config.ts | 1 + 3 files changed, 151 insertions(+) create mode 100644 .github/workflows/ci-test-allure.yml diff --git a/.github/workflows/ci-test-allure.yml b/.github/workflows/ci-test-allure.yml new file mode 100644 index 0000000000000..1c4a233b6024a --- /dev/null +++ b/.github/workflows/ci-test-allure.yml @@ -0,0 +1,146 @@ +name: E2E Tests with Allure Reports + +on: + pull_request: + branches: [main, develop] + +jobs: + e2e-tests: + name: E2E Tests + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [22.16.0] + browser: [chromium] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: Install dependencies + run: | + cd apps/meteor + yarn install --frozen-lockfile + + - name: Install Playwright browsers + run: | + cd apps/meteor + npx playwright install --with-deps ${{ matrix.browser }} + + - name: Install Allure Commandline + run: | + wget https://github.com/allure-framework/allure2/releases/download/2.24.1/allure-2.24.1.tgz + tar -zxf allure-2.24.1.tgz + sudo mv allure-2.24.1 /opt/allure + sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure + allure --version + + - name: Run E2E tests with Allure + run: | + cd apps/meteor + yarn test:e2e + env: + CI: true + NODE_ENV: test + + - name: Generate Allure report + if: always() + run: | + cd apps/meteor + mkdir -p tests/e2e/reports/allure + allure generate allure-results --clean --output tests/e2e/reports/allure + + - name: Upload Allure results as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: allure-results-${{ matrix.browser }}-${{ github.run_number }} + path: apps/meteor/allure-results/ + retention-days: 30 + + - name: Upload Allure report as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: allure-report-${{ matrix.browser }}-${{ github.run_number }} + path: apps/meteor/tests/e2e/reports/allure/ + retention-days: 30 + + - name: Upload HTML report as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: html-report-${{ matrix.browser }}-${{ github.run_number }} + path: apps/meteor/tests/e2e/reports/html/ + retention-days: 30 + + - name: Upload JUnit report as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: junit-report-${{ matrix.browser }}-${{ github.run_number }} + path: apps/meteor/tests/e2e/reports/junit.xml + retention-days: 30 + + - name: Publish Allure Report to GitHub Pages + if: github.ref == 'refs/heads/main' && always() + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./apps/meteor/tests/e2e/reports/allure + destination_dir: ./e2e-reports + + - name: Comment PR with Allure Report Link + if: github.event_name == 'pull_request' && always() + uses: actions/github-script@v7 + with: + script: | + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + + const botComment = comments.find(comment => + comment.user.type === 'Bot' && + comment.body.includes('Allure Report') + ); + + const reportUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/e2e-reports/`; + const commentBody = `## 📊 E2E Test Results + + **Allure Report**: [View Report](${reportUrl}) + + **Test Run**: #${{ github.run_number }} + **Browser**: ${{ matrix.browser }} + **Node.js**: ${{ matrix.node-version }} + + 📥 **Download Reports**: + - [Allure Results](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) + - [HTML Report](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) + + --- + *Reports are generated automatically for this PR*`; + + if (botComment) { + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: botComment.id, + body: commentBody, + }); + } else { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: commentBody, + }); + } diff --git a/apps/meteor/package.json b/apps/meteor/package.json index 926fa5487530f..59ca38f12ebf2 100644 --- a/apps/meteor/package.json +++ b/apps/meteor/package.json @@ -34,6 +34,8 @@ "typecheck": "meteor lint && cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" tsc --noEmit --skipLibCheck", "coverage": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' nyc -r html mocha --config ./.mocharc.js", "test:e2e": "playwright test", + "allure:generate": "allure generate allure-results --clean -o allure-report", + "allure:open": "allure open allure-report", "test:e2e:federation": "playwright test --config=playwright-federation.config.ts", "test:e2e:nyc": "nyc report --reporter=lcov", "testapi": "TS_NODE_COMPILER_OPTIONS='{\"module\": \"commonjs\"}' mocha --config ./.mocharc.api.js", @@ -158,6 +160,7 @@ "@types/xml-encryption": "~1.2.4", "@typescript-eslint/eslint-plugin": "~5.60.1", "@typescript-eslint/parser": "~5.60.1", + "allure-playwright": "3.1.0", "autoprefixer": "^9.8.8", "babel-loader": "~10.0.0", "babel-plugin-array-includes": "^2.0.3", @@ -189,6 +192,7 @@ "nyc": "^17.1.0", "outdent": "~0.8.0", "pino-pretty": "^7.6.1", + "playwright": "1.52.0", "playwright-core": "~1.52.0", "playwright-qase-reporter": "~2.1.6", "postcss": "~8.4.49", diff --git a/apps/meteor/playwright.config.ts b/apps/meteor/playwright.config.ts index 1b27badd2e2d3..e0069c58e55b7 100644 --- a/apps/meteor/playwright.config.ts +++ b/apps/meteor/playwright.config.ts @@ -22,6 +22,7 @@ export default { outputDir: 'tests/e2e/.playwright', reporter: [ ['list'], + ['allure-playwright'], process.env.REPORTER_ROCKETCHAT_REPORT === 'true' && [ './reporters/rocketchat.ts', { From dac2bf32fcb6283c0fb10623ba4cbc90724846f4 Mon Sep 17 00:00:00 2001 From: Harmeet221 Date: Fri, 10 Oct 2025 15:37:35 +0530 Subject: [PATCH 2/7] update pr --- .github/workflows/ci-allure-reports.yml | 148 ++++++++++++++++++++++++ 1 file changed, 148 insertions(+) create mode 100644 .github/workflows/ci-allure-reports.yml diff --git a/.github/workflows/ci-allure-reports.yml b/.github/workflows/ci-allure-reports.yml new file mode 100644 index 0000000000000..c518cb20bd36c --- /dev/null +++ b/.github/workflows/ci-allure-reports.yml @@ -0,0 +1,148 @@ +name: Generate Allure Reports + +on: + workflow_dispatch: + inputs: + publish-to-pages: + description: 'Publish report to GitHub Pages' + required: false + default: false + type: boolean + workflow_call: + inputs: + publish-to-pages: + required: false + type: boolean + default: false + description: 'Whether to publish report to GitHub Pages' + report-name: + required: false + type: string + default: 'Rocket.Chat E2E Test Report' + description: 'Name for the Allure report' + +jobs: + generate-allure-report: + name: 📊 Generate Allure Report + runs-on: ubuntu-24.04 + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + + - name: Install Allure Commandline + run: | + # Download and install Allure commandline tool + wget https://github.com/allure-framework/allure2/releases/download/2.24.1/allure-2.24.1.tgz + tar -zxf allure-2.24.1.tgz + sudo mv allure-2.24.1 /opt/allure + sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure + allure --version + + - name: Download E2E test artifacts + uses: actions/download-artifact@v4 + with: + pattern: allure-results-* + path: ./downloaded-artifacts + merge-multiple: true + + - name: Extract and combine Allure results + run: | + mkdir -p combined-allure-results + + # Extract Allure results from downloaded artifacts + for artifact_dir in ./downloaded-artifacts/*/; do + if [ -d "$artifact_dir" ]; then + echo "Processing artifact: $artifact_dir" + + # Look for allure-results in the artifact + if [ -d "$artifact_dir/apps/meteor/allure-results" ]; then + echo "Found Allure results in $artifact_dir" + cp -r "$artifact_dir/apps/meteor/allure-results"/* combined-allure-results/ 2>/dev/null || true + fi + + # Also check for results in the root of the artifact + if [ -d "$artifact_dir/allure-results" ]; then + echo "Found Allure results in root of $artifact_dir" + cp -r "$artifact_dir/allure-results"/* combined-allure-results/ 2>/dev/null || true + fi + fi + done + + # Count results + result_count=$(find combined-allure-results -name "*.json" | wc -l) + echo "📊 Found $result_count Allure result files" + + if [ $result_count -eq 0 ]; then + echo "⚠️ No Allure result files found. Creating empty report." + echo '{"uuid":"empty","name":"No E2E tests executed","status":"skipped","start":'$(date +%s000)',"stop":'$(date +%s000)',"steps":[]}' > combined-allure-results/empty-result.json + fi + + - name: Generate Allure Report + run: | + # Create report directory + mkdir -p allure-report + + # Generate Allure report from combined results + allure generate combined-allure-results --clean -o allure-report + + # Verify report was generated + if [ ! -d "allure-report" ] || [ ! -f "allure-report/index.html" ]; then + echo "❌ Failed to generate Allure report" + exit 1 + fi + + echo "✅ Allure report generated successfully" + ls -la allure-report/ + + - name: Upload Allure Report as Artifact + uses: actions/upload-artifact@v4 + with: + name: allure-e2e-report-${{ github.run_number }} + path: allure-report/ + retention-days: 30 + + - name: Publish to GitHub Pages + if: inputs.publish-to-pages == true || github.event.inputs.publish-to-pages == 'true' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./allure-report + destination_dir: allure-reports/e2e/${{ github.run_number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Comment PR with Report Link + if: github.event_name == 'pull_request' && (inputs.publish-to-pages == true || github.event.inputs.publish-to-pages == 'true') + uses: actions/github-script@v7 + with: + script: | + const reportUrl = `https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/allure-reports/e2e/${{ github.run_number }}`; + const reportName = '${{ inputs.report-name || "Rocket.Chat E2E Test Report" }}'; + + const comment = `## 📊 ${reportName} + + **Allure E2E Test Report:** [View Report](${reportUrl}) + + This report contains detailed E2E test results, including: + - Test execution summary + - Failed test details with screenshots and traces + - Test trends and history + - Environment information + - Playwright test traces for debugging + + --- + *E2E Test Report generated for commit: \`${{ github.sha }}\`*`; + + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: comment + }); From be0792102b138b60971ef49317527725f47a7175 Mon Sep 17 00:00:00 2001 From: Harmeet221 Date: Fri, 10 Oct 2025 15:46:32 +0530 Subject: [PATCH 3/7] delete a file --- .github/workflows/ci-allure-reports.yml | 148 ------------------------ .github/workflows/ci-test-allure.yml | 2 +- 2 files changed, 1 insertion(+), 149 deletions(-) delete mode 100644 .github/workflows/ci-allure-reports.yml diff --git a/.github/workflows/ci-allure-reports.yml b/.github/workflows/ci-allure-reports.yml deleted file mode 100644 index c518cb20bd36c..0000000000000 --- a/.github/workflows/ci-allure-reports.yml +++ /dev/null @@ -1,148 +0,0 @@ -name: Generate Allure Reports - -on: - workflow_dispatch: - inputs: - publish-to-pages: - description: 'Publish report to GitHub Pages' - required: false - default: false - type: boolean - workflow_call: - inputs: - publish-to-pages: - required: false - type: boolean - default: false - description: 'Whether to publish report to GitHub Pages' - report-name: - required: false - type: string - default: 'Rocket.Chat E2E Test Report' - description: 'Name for the Allure report' - -jobs: - generate-allure-report: - name: 📊 Generate Allure Report - runs-on: ubuntu-24.04 - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Node.js - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - - name: Install Allure Commandline - run: | - # Download and install Allure commandline tool - wget https://github.com/allure-framework/allure2/releases/download/2.24.1/allure-2.24.1.tgz - tar -zxf allure-2.24.1.tgz - sudo mv allure-2.24.1 /opt/allure - sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure - allure --version - - - name: Download E2E test artifacts - uses: actions/download-artifact@v4 - with: - pattern: allure-results-* - path: ./downloaded-artifacts - merge-multiple: true - - - name: Extract and combine Allure results - run: | - mkdir -p combined-allure-results - - # Extract Allure results from downloaded artifacts - for artifact_dir in ./downloaded-artifacts/*/; do - if [ -d "$artifact_dir" ]; then - echo "Processing artifact: $artifact_dir" - - # Look for allure-results in the artifact - if [ -d "$artifact_dir/apps/meteor/allure-results" ]; then - echo "Found Allure results in $artifact_dir" - cp -r "$artifact_dir/apps/meteor/allure-results"/* combined-allure-results/ 2>/dev/null || true - fi - - # Also check for results in the root of the artifact - if [ -d "$artifact_dir/allure-results" ]; then - echo "Found Allure results in root of $artifact_dir" - cp -r "$artifact_dir/allure-results"/* combined-allure-results/ 2>/dev/null || true - fi - fi - done - - # Count results - result_count=$(find combined-allure-results -name "*.json" | wc -l) - echo "📊 Found $result_count Allure result files" - - if [ $result_count -eq 0 ]; then - echo "⚠️ No Allure result files found. Creating empty report." - echo '{"uuid":"empty","name":"No E2E tests executed","status":"skipped","start":'$(date +%s000)',"stop":'$(date +%s000)',"steps":[]}' > combined-allure-results/empty-result.json - fi - - - name: Generate Allure Report - run: | - # Create report directory - mkdir -p allure-report - - # Generate Allure report from combined results - allure generate combined-allure-results --clean -o allure-report - - # Verify report was generated - if [ ! -d "allure-report" ] || [ ! -f "allure-report/index.html" ]; then - echo "❌ Failed to generate Allure report" - exit 1 - fi - - echo "✅ Allure report generated successfully" - ls -la allure-report/ - - - name: Upload Allure Report as Artifact - uses: actions/upload-artifact@v4 - with: - name: allure-e2e-report-${{ github.run_number }} - path: allure-report/ - retention-days: 30 - - - name: Publish to GitHub Pages - if: inputs.publish-to-pages == true || github.event.inputs.publish-to-pages == 'true' - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./allure-report - destination_dir: allure-reports/e2e/${{ github.run_number }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Comment PR with Report Link - if: github.event_name == 'pull_request' && (inputs.publish-to-pages == true || github.event.inputs.publish-to-pages == 'true') - uses: actions/github-script@v7 - with: - script: | - const reportUrl = `https://${{ github.repository_owner }}.github.io/${{ github.event.repository.name }}/allure-reports/e2e/${{ github.run_number }}`; - const reportName = '${{ inputs.report-name || "Rocket.Chat E2E Test Report" }}'; - - const comment = `## 📊 ${reportName} - - **Allure E2E Test Report:** [View Report](${reportUrl}) - - This report contains detailed E2E test results, including: - - Test execution summary - - Failed test details with screenshots and traces - - Test trends and history - - Environment information - - Playwright test traces for debugging - - --- - *E2E Test Report generated for commit: \`${{ github.sha }}\`*`; - - github.rest.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: comment - }); diff --git a/.github/workflows/ci-test-allure.yml b/.github/workflows/ci-test-allure.yml index 1c4a233b6024a..fadcf5859aa37 100644 --- a/.github/workflows/ci-test-allure.yml +++ b/.github/workflows/ci-test-allure.yml @@ -2,7 +2,7 @@ name: E2E Tests with Allure Reports on: pull_request: - branches: [main, develop] + branches: [reports] jobs: e2e-tests: From e03a201f2d6c1ae448c8ef411865c5566e7b5a00 Mon Sep 17 00:00:00 2001 From: Harmeet221 Date: Wed, 15 Oct 2025 11:29:58 +0530 Subject: [PATCH 4/7] updated ci --- .github/workflows/ci-test-allure.yml | 146 --------------------------- .github/workflows/ci-test-e2e.yml | 93 +++++++++++++++++ 2 files changed, 93 insertions(+), 146 deletions(-) delete mode 100644 .github/workflows/ci-test-allure.yml diff --git a/.github/workflows/ci-test-allure.yml b/.github/workflows/ci-test-allure.yml deleted file mode 100644 index fadcf5859aa37..0000000000000 --- a/.github/workflows/ci-test-allure.yml +++ /dev/null @@ -1,146 +0,0 @@ -name: E2E Tests with Allure Reports - -on: - pull_request: - branches: [reports] - -jobs: - e2e-tests: - name: E2E Tests - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [22.16.0] - browser: [chromium] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'yarn' - - - name: Install dependencies - run: | - cd apps/meteor - yarn install --frozen-lockfile - - - name: Install Playwright browsers - run: | - cd apps/meteor - npx playwright install --with-deps ${{ matrix.browser }} - - - name: Install Allure Commandline - run: | - wget https://github.com/allure-framework/allure2/releases/download/2.24.1/allure-2.24.1.tgz - tar -zxf allure-2.24.1.tgz - sudo mv allure-2.24.1 /opt/allure - sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure - allure --version - - - name: Run E2E tests with Allure - run: | - cd apps/meteor - yarn test:e2e - env: - CI: true - NODE_ENV: test - - - name: Generate Allure report - if: always() - run: | - cd apps/meteor - mkdir -p tests/e2e/reports/allure - allure generate allure-results --clean --output tests/e2e/reports/allure - - - name: Upload Allure results as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: allure-results-${{ matrix.browser }}-${{ github.run_number }} - path: apps/meteor/allure-results/ - retention-days: 30 - - - name: Upload Allure report as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: allure-report-${{ matrix.browser }}-${{ github.run_number }} - path: apps/meteor/tests/e2e/reports/allure/ - retention-days: 30 - - - name: Upload HTML report as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: html-report-${{ matrix.browser }}-${{ github.run_number }} - path: apps/meteor/tests/e2e/reports/html/ - retention-days: 30 - - - name: Upload JUnit report as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: junit-report-${{ matrix.browser }}-${{ github.run_number }} - path: apps/meteor/tests/e2e/reports/junit.xml - retention-days: 30 - - - name: Publish Allure Report to GitHub Pages - if: github.ref == 'refs/heads/main' && always() - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./apps/meteor/tests/e2e/reports/allure - destination_dir: ./e2e-reports - - - name: Comment PR with Allure Report Link - if: github.event_name == 'pull_request' && always() - uses: actions/github-script@v7 - with: - script: | - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }); - - const botComment = comments.find(comment => - comment.user.type === 'Bot' && - comment.body.includes('Allure Report') - ); - - const reportUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/e2e-reports/`; - const commentBody = `## 📊 E2E Test Results - - **Allure Report**: [View Report](${reportUrl}) - - **Test Run**: #${{ github.run_number }} - **Browser**: ${{ matrix.browser }} - **Node.js**: ${{ matrix.node-version }} - - 📥 **Download Reports**: - - [Allure Results](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) - - [HTML Report](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) - - --- - *Reports are generated automatically for this PR*`; - - if (botComment) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: botComment.id, - body: commentBody, - }); - } else { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: commentBody, - }); - } diff --git a/.github/workflows/ci-test-e2e.yml b/.github/workflows/ci-test-e2e.yml index 84ebeca360068..eb016da544b5d 100644 --- a/.github/workflows/ci-test-e2e.yml +++ b/.github/workflows/ci-test-e2e.yml @@ -293,6 +293,99 @@ jobs: path: ./apps/meteor/tests/e2e/.playwright* include-hidden-files: true + - name: Install Allure Commandline + run: | + wget https://github.com/allure-framework/allure2/releases/download/2.24.1/allure-2.24.1.tgz + tar -zxf allure-2.24.1.tgz + sudo mv allure-2.24.1 /opt/allure + sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure + allure --version + + - name: Generate Allure report + if: always() + run: + cd apps/meteor + mkdir -p tests/e2e/reports/allure + allure generate allure-results --clean --output tests/e2e/reports/allure + + - name: Upload Allure results as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: allure-results-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + path: apps/meteor/allure-results/ + retention-days: 30 + + - name: Upload HTML report as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: html-report-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + path: apps/meteor/tests/e2e/reports/html/ + retention-days: 30 + + - name: Upload JUnit report as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: junit-report-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + path: apps/meteor/tests/e2e/reports/junit.xml + retention-days: 30 + + - name: Publish Allure Report to GitHub Pages + if: github.ref == 'refs/heads/main' && always() + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./apps/meteor/tests/e2e/reports/allure + destination_dir: ./e2e-reports + + - name: Comment PR with Allure Report Link + if: github.event_name == 'pull_request' && always() + uses: actions/github-script@v7 + with: + script: | + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + + const botComment = comments.find(comment => + comment.user.type === 'Bot' && + comment.body.includes('Allure Report') + ); + + const reportUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/e2e-reports/`; + const commentBody = `## 📊 E2E Test Results + + **Allure Report**: [View Report](${reportUrl}) + + **Test Run**: #${{ github.run_number }} + + 📥 **Download Reports**: + - [Allure Results](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) + - [HTML Report](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) + + --- + *Reports are generated automatically for this PR*`; + + if (botComment) { + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: botComment.id, + body: commentBody, + }); + } else { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: commentBody, + }); + } + - name: Show server logs if E2E test failed if: failure() && inputs.release == 'ee' run: docker compose -f docker-compose-ci.yml logs From d01ed70268ab51f083eb9c3aa335387cdc6f0027 Mon Sep 17 00:00:00 2001 From: Harmeet221 Date: Wed, 15 Oct 2025 12:46:57 +0530 Subject: [PATCH 5/7] redo changes --- .github/workflows/ci-test-e2e.yml | 93 ------------------------------- 1 file changed, 93 deletions(-) diff --git a/.github/workflows/ci-test-e2e.yml b/.github/workflows/ci-test-e2e.yml index eb016da544b5d..84ebeca360068 100644 --- a/.github/workflows/ci-test-e2e.yml +++ b/.github/workflows/ci-test-e2e.yml @@ -293,99 +293,6 @@ jobs: path: ./apps/meteor/tests/e2e/.playwright* include-hidden-files: true - - name: Install Allure Commandline - run: | - wget https://github.com/allure-framework/allure2/releases/download/2.24.1/allure-2.24.1.tgz - tar -zxf allure-2.24.1.tgz - sudo mv allure-2.24.1 /opt/allure - sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure - allure --version - - - name: Generate Allure report - if: always() - run: - cd apps/meteor - mkdir -p tests/e2e/reports/allure - allure generate allure-results --clean --output tests/e2e/reports/allure - - - name: Upload Allure results as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: allure-results-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} - path: apps/meteor/allure-results/ - retention-days: 30 - - - name: Upload HTML report as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: html-report-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} - path: apps/meteor/tests/e2e/reports/html/ - retention-days: 30 - - - name: Upload JUnit report as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: junit-report-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} - path: apps/meteor/tests/e2e/reports/junit.xml - retention-days: 30 - - - name: Publish Allure Report to GitHub Pages - if: github.ref == 'refs/heads/main' && always() - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./apps/meteor/tests/e2e/reports/allure - destination_dir: ./e2e-reports - - - name: Comment PR with Allure Report Link - if: github.event_name == 'pull_request' && always() - uses: actions/github-script@v7 - with: - script: | - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }); - - const botComment = comments.find(comment => - comment.user.type === 'Bot' && - comment.body.includes('Allure Report') - ); - - const reportUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/e2e-reports/`; - const commentBody = `## 📊 E2E Test Results - - **Allure Report**: [View Report](${reportUrl}) - - **Test Run**: #${{ github.run_number }} - - 📥 **Download Reports**: - - [Allure Results](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) - - [HTML Report](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) - - --- - *Reports are generated automatically for this PR*`; - - if (botComment) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: botComment.id, - body: commentBody, - }); - } else { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: commentBody, - }); - } - - name: Show server logs if E2E test failed if: failure() && inputs.release == 'ee' run: docker compose -f docker-compose-ci.yml logs From 0d35852cd10f21da659eaf9455bc75adde465c76 Mon Sep 17 00:00:00 2001 From: Harmeet221 Date: Wed, 15 Oct 2025 12:48:42 +0530 Subject: [PATCH 6/7] new flow --- .github/workflows/ci-test-allure.yml | 180 +++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 .github/workflows/ci-test-allure.yml diff --git a/.github/workflows/ci-test-allure.yml b/.github/workflows/ci-test-allure.yml new file mode 100644 index 0000000000000..6bf1da3b18edf --- /dev/null +++ b/.github/workflows/ci-test-allure.yml @@ -0,0 +1,180 @@ +name: E2E Tests with Allure Reports + +on: + pull_request: + branches: [reports] + push: + branches: [develop] + +jobs: + e2e-tests: + name: E2E Tests + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [22.16.0] + browser: [chromium] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'yarn' + + - name: Install dependencies + run: | + cd apps/meteor + yarn install --frozen-lockfile + + - name: Install Playwright browsers + run: | + cd apps/meteor + npx playwright install --with-deps ${{ matrix.browser }} + + - name: Install Allure Commandline + run: | + # Download and install Allure commandline tool + wget https://github.com/allure-framework/allure2/releases/download/2.24.1/allure-2.24.1.tgz + tar -zxf allure-2.24.1.tgz + sudo mv allure-2.24.1 /opt/allure + sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure + allure --version + + - name: Prepare Allure results directory + run: | + cd apps/meteor + mkdir -p allure-results + echo "📁 Created allure-results directory" + + - name: Run Playwright tests + run: | + cd apps/meteor + yarn test:e2e + env: + CI: true + NODE_ENV: test + + - name: Debug - Check Allure results + if: always() + run: | + cd apps/meteor + echo "🔍 Checking for Allure results..." + if [ -d "allure-results" ]; then + echo "✅ allure-results directory exists" + echo "Contents:" + ls -la allure-results/ + echo "JSON files count: $(find allure-results -name "*.json" | wc -l)" + else + echo "❌ allure-results directory does not exist" + fi + + - name: Generate Allure Report + if: always() + run: | + cd apps/meteor + mkdir -p allure-report + + # Check if allure-results exists and has content + if [ -d "allure-results" ] && [ "$(find allure-results -name "*.json" | wc -l)" -gt 0 ]; then + echo "📊 Generating Allure report from allure-results directory" + allure generate allure-results --clean -o allure-report + else + echo "⚠️ No Allure results found, creating empty report" + echo '{"uuid":"empty","name":"No tests executed","status":"skipped","start":'$(date +%s000)',"stop":'$(date +%s000)',"steps":[]}' > allure-results/empty-result.json + allure generate allure-results --clean -o allure-report + fi + + - name: Upload Allure results as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: allure-results-${{ matrix.browser }}-${{ github.run_number }} + path: apps/meteor/allure-results/ + retention-days: 30 + + - name: Upload Allure report as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: allure-report-${{ matrix.browser }}-${{ github.run_number }} + path: apps/meteor/allure-report/ + retention-days: 30 + + - name: Upload HTML report as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: html-report-${{ matrix.browser }}-${{ github.run_number }} + path: apps/meteor/tests/e2e/reports/html/ + retention-days: 30 + + - name: Upload JUnit report as artifacts + if: always() + uses: actions/upload-artifact@v4 + with: + name: junit-report-${{ matrix.browser }}-${{ github.run_number }} + path: apps/meteor/tests/e2e/reports/junit.xml + retention-days: 30 + + - name: Publish Allure Report to GitHub Pages + if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./apps/meteor/allure-report + destination_dir: allure-reports/e2e/${{ github.run_number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Comment PR with Allure Report Link + if: github.event_name == 'pull_request' && always() + uses: actions/github-script@v7 + with: + script: | + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + + const botComment = comments.find(comment => + comment.user.type === 'Bot' && + comment.body.includes('Allure Report') + ); + + const reportUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/allure-reports/e2e/${{ github.run_number }}/`; + const commentBody = `## 📊 E2E Test Results + + **Allure Report**: [View Report](${reportUrl}) + + **Test Run**: #${{ github.run_number }} + **Browser**: ${{ matrix.browser }} + **Node.js**: ${{ matrix.node-version }} + + 📥 **Download Reports**: + - [Allure Results](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) + - [Allure Report](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) + + --- + *Reports are generated automatically for this PR*`; + + if (botComment) { + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: botComment.id, + body: commentBody, + }); + } else { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: commentBody, + }); + } From 3f9cd6e9897bd43d044eff3d0931b458e6222e02 Mon Sep 17 00:00:00 2001 From: Harmeet221 Date: Fri, 24 Oct 2025 12:57:04 +0530 Subject: [PATCH 7/7] updated flow --- .github/workflows/ci-test-allure.yml | 180 --------------------------- .github/workflows/ci-test-e2e.yml | 113 +++++++++++++++++ .github/workflows/ci.yml | 84 +++++-------- 3 files changed, 145 insertions(+), 232 deletions(-) delete mode 100644 .github/workflows/ci-test-allure.yml diff --git a/.github/workflows/ci-test-allure.yml b/.github/workflows/ci-test-allure.yml deleted file mode 100644 index 6bf1da3b18edf..0000000000000 --- a/.github/workflows/ci-test-allure.yml +++ /dev/null @@ -1,180 +0,0 @@ -name: E2E Tests with Allure Reports - -on: - pull_request: - branches: [reports] - push: - branches: [develop] - -jobs: - e2e-tests: - name: E2E Tests - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [22.16.0] - browser: [chromium] - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Setup Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: 'yarn' - - - name: Install dependencies - run: | - cd apps/meteor - yarn install --frozen-lockfile - - - name: Install Playwright browsers - run: | - cd apps/meteor - npx playwright install --with-deps ${{ matrix.browser }} - - - name: Install Allure Commandline - run: | - # Download and install Allure commandline tool - wget https://github.com/allure-framework/allure2/releases/download/2.24.1/allure-2.24.1.tgz - tar -zxf allure-2.24.1.tgz - sudo mv allure-2.24.1 /opt/allure - sudo ln -s /opt/allure/bin/allure /usr/local/bin/allure - allure --version - - - name: Prepare Allure results directory - run: | - cd apps/meteor - mkdir -p allure-results - echo "📁 Created allure-results directory" - - - name: Run Playwright tests - run: | - cd apps/meteor - yarn test:e2e - env: - CI: true - NODE_ENV: test - - - name: Debug - Check Allure results - if: always() - run: | - cd apps/meteor - echo "🔍 Checking for Allure results..." - if [ -d "allure-results" ]; then - echo "✅ allure-results directory exists" - echo "Contents:" - ls -la allure-results/ - echo "JSON files count: $(find allure-results -name "*.json" | wc -l)" - else - echo "❌ allure-results directory does not exist" - fi - - - name: Generate Allure Report - if: always() - run: | - cd apps/meteor - mkdir -p allure-report - - # Check if allure-results exists and has content - if [ -d "allure-results" ] && [ "$(find allure-results -name "*.json" | wc -l)" -gt 0 ]; then - echo "📊 Generating Allure report from allure-results directory" - allure generate allure-results --clean -o allure-report - else - echo "⚠️ No Allure results found, creating empty report" - echo '{"uuid":"empty","name":"No tests executed","status":"skipped","start":'$(date +%s000)',"stop":'$(date +%s000)',"steps":[]}' > allure-results/empty-result.json - allure generate allure-results --clean -o allure-report - fi - - - name: Upload Allure results as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: allure-results-${{ matrix.browser }}-${{ github.run_number }} - path: apps/meteor/allure-results/ - retention-days: 30 - - - name: Upload Allure report as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: allure-report-${{ matrix.browser }}-${{ github.run_number }} - path: apps/meteor/allure-report/ - retention-days: 30 - - - name: Upload HTML report as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: html-report-${{ matrix.browser }}-${{ github.run_number }} - path: apps/meteor/tests/e2e/reports/html/ - retention-days: 30 - - - name: Upload JUnit report as artifacts - if: always() - uses: actions/upload-artifact@v4 - with: - name: junit-report-${{ matrix.browser }}-${{ github.run_number }} - path: apps/meteor/tests/e2e/reports/junit.xml - retention-days: 30 - - - name: Publish Allure Report to GitHub Pages - if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./apps/meteor/allure-report - destination_dir: allure-reports/e2e/${{ github.run_number }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Comment PR with Allure Report Link - if: github.event_name == 'pull_request' && always() - uses: actions/github-script@v7 - with: - script: | - const { data: comments } = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }); - - const botComment = comments.find(comment => - comment.user.type === 'Bot' && - comment.body.includes('Allure Report') - ); - - const reportUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/allure-reports/e2e/${{ github.run_number }}/`; - const commentBody = `## 📊 E2E Test Results - - **Allure Report**: [View Report](${reportUrl}) - - **Test Run**: #${{ github.run_number }} - **Browser**: ${{ matrix.browser }} - **Node.js**: ${{ matrix.node-version }} - - 📥 **Download Reports**: - - [Allure Results](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) - - [Allure Report](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) - - --- - *Reports are generated automatically for this PR*`; - - if (botComment) { - await github.rest.issues.updateComment({ - owner: context.repo.owner, - repo: context.repo.repo, - comment_id: botComment.id, - body: commentBody, - }); - } else { - await github.rest.issues.createComment({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body: commentBody, - }); - } diff --git a/.github/workflows/ci-test-e2e.yml b/.github/workflows/ci-test-e2e.yml index 84ebeca360068..473905595170d 100644 --- a/.github/workflows/ci-test-e2e.yml +++ b/.github/workflows/ci-test-e2e.yml @@ -285,6 +285,21 @@ jobs: yarn prepare yarn test:e2e --shard=${{ matrix.shard }}/${{ inputs.total-shard }} + - name: Generate Allure Report + if: always() + run: | + cd apps/meteor + mkdir -p allure-report + # Check if allure-results exists and has content + if [ -d "allure-result-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }}" ] && [ "$(find allure-result-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} -name "*.json" | wc -l)" -gt 0 ]; then + echo "📊 Generating Allure report from allure-results directory" + allure generate allure-result --clean -o allure-report + else + echo "⚠️ No Allure results found, creating empty report" + echo '{"uuid":"empty","name":"No tests executed","status":"skipped","start":'$(date +%s000)',"stop":'$(date +%s000)',"steps":[]}' > allure-result-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }}/empty-result.json + allure generate allure-result --clean -o allure-report + fi + - name: Store playwright test trace if: inputs.type == 'ui' && always() uses: actions/upload-artifact@v4 @@ -293,6 +308,54 @@ jobs: path: ./apps/meteor/tests/e2e/.playwright* include-hidden-files: true + - name: Store allure result + if: inputs.type == 'ui' && always() + uses: actions/upload-artifact@v4 + with: + name: allure-result-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + path: ./apps/meteor/allure-result-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }}.json + if-no-files-found: ignore + + - name: Store API allure result + if: inputs.type == 'api' && always() + uses: actions/upload-artifact@v4 + with: + name: allure-result-api-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + path: ./apps/meteor/allure-result-api-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }}.json + if-no-files-found: ignore + + - name: Store allure report + if: inputs.type == 'ui' && always() + uses: actions/upload-artifact@v4 + with: + name: allure-report-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + path: ./apps/meteor/allure-report-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }}.json + if-no-files-found: ignore + + - name: Store API allure report + if: inputs.type == 'api' && always() + uses: actions/upload-artifact@v4 + with: + name: allure-report-api-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + path: ./apps/meteor/allure-report-api-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }}.json + if-no-files-found: ignore + + - name: Upload JUnit report as artifacts + if: inputs.type == 'ui' && always() + uses: actions/upload-artifact@v4 + with: + name: junit-report-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + path: ./apps/meteor/junit-report-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }}/.xml + if-no-files-found: ignore + + - name: Upload JUnit report as artifacts + if: inputs.type == 'api' && always() + uses: actions/upload-artifact@v4 + with: + name: junit-report-api-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + path: ./apps/meteor/junit-report-api-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }}/.xml + if-no-files-found: ignore + - name: Show server logs if E2E test failed if: failure() && inputs.release == 'ee' run: docker compose -f docker-compose-ci.yml logs @@ -338,3 +401,53 @@ jobs: name: e2e-ee-coverage-${{ matrix.mongodb-version }}-${{ matrix.shard }} path: ./apps/meteor/coverage* include-hidden-files: true + + - name: Publish Allure Report to GitHub Pages + if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./apps/meteor/allure-report + destination_dir: allure-report/e2e-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Comment PR with Allure Report Link + if: github.event_name == 'pull_request' && always() + uses: actions/github-script@v7 + with: + script: | + const { data: comments } = await github.rest.issues.listComments({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }); + const botComment = comments.find(comment => + comment.user.type === 'Bot' && + comment.body.includes('Allure Report') + ); + const reportUrl = `https://${context.repo.owner}.github.io/${context.repo.repo}/allure-report/e2e-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }}/`; + const commentBody = `## 📊 E2E Test Results + **Allure Report**: [View Report](${reportUrl}) + **Test Run**: #${{ github.run_number }} + 📥 **Download Reports**: + - [Allure Results](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) + - [Allure Report](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) + - [JUnit Report](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) + --- + *Reports are generated automatically for this PR*`; + if (botComment) { + await github.rest.issues.updateComment({ + owner: context.repo.owner, + repo: context.repo.repo, + comment_id: botComment.id, + body: commentBody, + }); + } else { + await github.rest.issues.createComment({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body: commentBody, + }); + } diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7d94af3025df4..247e243135dec 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -247,54 +247,9 @@ jobs: deno-version: ${{ needs.release-versions.outputs.deno-version }} coverage: false - # TODO: this should go away once upstream builds are fixed - build-matrix-rust-bindings-for-alpine: - name: Builds matrix rust bindings against alpine - runs-on: ubuntu-24.04 - steps: - - name: check cache for matrix-rust-sdk-crypto-nodejs - id: matrix-rust-sdk-crypto-nodejs - uses: actions/cache@v4 - with: - path: /tmp/build/matrix-sdk-crypto.linux-x64-musl.node - key: matrix-rust-sdk-crypto-nodejs-v0.2.0-beta.1 - - - uses: actions/checkout@v4 - with: - repository: matrix-org/matrix-rust-sdk-crypto-nodejs - ref: v0.2.0-beta.1 # https://github.com/element-hq/matrix-bot-sdk/blob/e72a4c498e00c6c339a791630c45d00a351f56a8/package.json#L58 - - - if: steps.matrix-rust-sdk-crypto-nodejs.outputs.cache-hit != 'true' - run: sudo apt-get install -y musl-tools libunwind-dev && find /usr/include -name stdarg.h 2>/dev/null || true - - - if: steps.matrix-rust-sdk-crypto-nodejs.outputs.cache-hit != 'true' - uses: actions/setup-node@v4.4.0 - with: - node-version: 22.16.0 - - - if: steps.matrix-rust-sdk-crypto-nodejs.outputs.cache-hit != 'true' - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: '1.76' - target: x86_64-unknown-linux-musl - - - if: steps.matrix-rust-sdk-crypto-nodejs.outputs.cache-hit != 'true' - name: Install ziglang - uses: mlugg/setup-zig@v1 - with: - version: 0.13.0 - - - if: steps.matrix-rust-sdk-crypto-nodejs.outputs.cache-hit != 'true' - name: Build - run: | - npm install --ignore-scripts - npx napi build --release --target x86_64-unknown-linux-musl --platform --zig - mkdir -p /tmp/build - mv matrix-sdk-crypto.linux-x64-musl.node /tmp/build/matrix-sdk-crypto.linux-x64-musl.node - build-gh-docker-coverage: name: 🚢 Build Docker Images for Testing - needs: [build, release-versions, build-matrix-rust-bindings-for-alpine] + needs: [build, release-versions] runs-on: ubuntu-24.04 env: @@ -323,11 +278,6 @@ jobs: build-containers: ${{ matrix.platform == needs.release-versions.outputs.official-platform && 'authorization-service account-service ddp-streamer-service presence-service stream-hub-service queue-worker-service omnichannel-transcript-service' || '' }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Make sure matrix bindings load - if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && matrix.platform == 'alpine' && github.actor != 'dependabot[bot]' - run: | - docker run --rm -w /app/bundle/programs/server/npm/node_modules/matrix-appservice-bridge ghcr.io/rocketchat/rocket.chat:$RC_DOCKER_TAG -e 'require(".")' - - name: Rename official Docker tag to GitHub Container Registry if: matrix.platform == needs.release-versions.outputs.official-platform && (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'release' || github.ref == 'refs/heads/develop') && github.actor != 'dependabot[bot]' run: | @@ -536,10 +486,40 @@ jobs: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} REPORTER_JIRA_ROCKETCHAT_API_KEY: ${{ secrets.REPORTER_JIRA_ROCKETCHAT_API_KEY }} + allure-report: + name: 📊 Generate Allure Report + runs-on: ubuntu-24.04 + needs: [test-api, test-api-ee, test-ui, test-ui-ee, test-ui-ee-watcher] + if: always() && (needs.test-api.result != 'skipped' || needs.test-api-ee.result != 'skipped' || needs.test-ui.result != 'skipped' || needs.test-ui-ee.result != 'skipped' || needs.test-ui-ee-watcher.result != 'skipped') + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: '18' + + - name: Download all test results + uses: actions/download-artifact@v4 + with: + pattern: allure-result-* + merge-multiple: true + path: ./downloaded-artifacts + + - name: Publish Allure Report to GitHub Pages + if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./apps/meteor/allure-report + destination_dir: allure-report/e2e-${{ inputs.release }}-${{ matrix.mongodb-version }}-${{ matrix.shard }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + tests-done: name: ✅ Tests Done runs-on: ubuntu-24.04 - needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee, test-ui-ee-watcher] + needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee, test-ui-ee-watcher, allure-report] if: always() steps: - name: Test finish aggregation