Skip to content

Add ability to set custom report name in final allure report #1590

Add ability to set custom report name in final allure report

Add ability to set custom report name in final allure report #1590

Workflow file for this run

name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
rubocop:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Ruby 3.3
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3
bundler-cache: true
- name: Rubocop
run: bundle exec rubocop --color
rspec:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3"]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: RSpec
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: c782e3e534f6aac1bb5a0d595723167ed145d03567242c2ce848ef46ba36672a
COVERAGE: "true"
ALLURE_ENVIRONMENT: ruby-${{ matrix.ruby }}
with:
coverageCommand: bundle exec rspec --force-color
coverageLocations: coverage/coverage.json:simplecov
- uses: actions/upload-artifact@v4
if: always()
with:
name: allure-reports-${{ matrix.ruby }}
path: reports/allure-results/
retention-days: 1
publish-report:
runs-on: ubuntu-latest
needs: rspec
if: always()
name: Publish report to ${{ matrix.provider }}
strategy:
fail-fast: false
matrix:
include:
- provider: gcs
bucket: allure-test-reports
table: markdown
results: actions
- provider: s3
bucket: allure-tests-reports
table: ascii
results: description
steps:
- name: Checkout
uses: actions/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Build
uses: docker/[email protected]
with:
context: .
push: false
load: true
tags: publisher:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Download allure reports
uses: actions/download-artifact@v4
with:
path: reports/allure-results
- name: Publish allure report
env:
GOOGLE_CLOUD_CREDENTIALS_JSON: ${{ secrets.GOOGLE_CLOUD_CREDENTIALS_JSON }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
docker run --rm \
-v "$(pwd)":/workspace \
-v "$GITHUB_EVENT_PATH:$GITHUB_EVENT_PATH" \
-v "$GITHUB_STEP_SUMMARY:$GITHUB_STEP_SUMMARY" \
-e GITHUB_WORKFLOW="$GITHUB_WORKFLOW" \
-e GITHUB_EVENT_NAME="$GITHUB_EVENT_NAME" \
-e GITHUB_EVENT_PATH="$GITHUB_EVENT_PATH" \
-e GITHUB_SERVER_URL="$GITHUB_SERVER_URL" \
-e GITHUB_API_URL="$GITHUB_API_URL" \
-e GITHUB_REPOSITORY="$GITHUB_REPOSITORY" \
-e GITHUB_RUN_ID="$GITHUB_RUN_ID" \
-e GITHUB_AUTH_TOKEN="$GITHUB_AUTH_TOKEN" \
-e GITHUB_SHA="$GITHUB_SHA" \
-e GITHUB_STEP_SUMMARY="$GITHUB_STEP_SUMMARY" \
-e GOOGLE_CLOUD_CREDENTIALS_JSON="$GOOGLE_CLOUD_CREDENTIALS_JSON" \
-e AWS_ACCESS_KEY_ID="$AWS_ACCESS_KEY_ID" \
-e AWS_SECRET_ACCESS_KEY="$AWS_SECRET_ACCESS_KEY" \
-e ALLURE_JOB_NAME="rspec" \
publisher:latest \
upload ${{ matrix.provider }} \
--results-glob="/workspace/reports/allure-results/*" \
--bucket="${{ matrix.bucket }}" \
--prefix="allure-report-publisher/$GITHUB_REF" \
--update-pr="${{ matrix.results }}" \
--summary="behaviors" \
--summary-table-type="${{ matrix.table }}" \
--report-title="Test Report" \
--report-name="Test Report" \
--copy-latest \
--color \
--debug