This thread is trying to answer question "What's the best and easy way to share report after a GitHub actions job?"
This assumes you have authenticated your AWS user through a gh action like aws-actions/configure-aws-credentials@v1-node16
- name: Push files to S3
if: always()
id: push_files_to_s3
run: aws s3 sync playwright-report s3://S3_BUKET_NAME/${{env.PR_NUMBER}}_${{ github.run_id }} --include "playwright report/*" --expires "$(date -d '+30 day' --utc +'%Y-%m-%dT%H:%M:%SZ')"
I have plans to write a guide on how to do this, but may be a few months. This is the jist of sending files to an S3 bucket. There are S3 bucket configurations that need to be done to make it a visible webpage.
If you have secrets or private information in your test data, I would definitely talk to someone on infrastructure team or security team to ensure the url is built in a way that is only accessible via vpn or password protected.
Related Ask AI answer for "How do I use AWS services to share a report after a GitHub Actions job and generate a unique static website from a zipped file?".
Sure, let's get started with AWS services to share your report after a GitHub Actions job and generate a unique static website from a zipped file.
First, you need to create an S3 bucket in your AWS account. This bucket will store the zipped file and serve as the source for your static website.
After creating the S3 bucket, upload the zipped file containing your report to this bucket. You can use the AWS Management Console or AWS CLI for this.
Next, enable Static Website Hosting for your S3 bucket. Go to the Properties tab of your bucket in the AWS Management Console and select "Static website hosting". Specify an index document (like index.html) that will be served when accessing your website.
To allow public access to your static website, configure a Bucket Policy that grants read access to all users or specific IAM roles/users. You can define this policy under Permissions > Bucket Policy in the AWS Management Console.
If you want to improve performance and add SSL/TLS encryption, consider creating a CloudFront distribution for your static website using Amazon CloudFront service.
If you want to use a custom domain name for your static website, configure DNS settings using Amazon Route 53 service. Create appropriate records (like A record or CNAME record) that point to either CloudFront distribution or directly to S3 endpoint.
Finally, to provide secure access control and temporary URLs for downloading files from S3, generate pre-signed URLs using AWS SDKs or CLI tools like aws s3 presign
. Share these URLs with users to download the zipped file.
That's it! You've now set up a unique static website using AWS services to share your report after a GitHub Actions job. This approach leverages the scalability and reliability of AWS infrastructure. For more specific requirements, consult the official AWS documentation or seek professional guidance.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].