CS-198 add all files for cypress which are generated by codGen #13
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run automation scripts | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
jobs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: | | ||
echo The PR was merged | ||
- name: Run generated Cypress Automation scripts | ||
run: | | ||
pwd | ||
ls | ||
# Ensure the directory exists before navigating to it | ||
test -d /tmp/cypress-umesh && cd /tmp/cypress-umesh || echo "/tmp/cypress-umesh directory does not exist" | ||
ls -lrta /tmp/cypress-umesh | ||
npm run test | ||
- name: Generate report for cypress- | ||
if: ${{ ! cancelled() }} | ||
run: | | ||
cd /tmp/cypress-umesh | ||
npm run generate-merge-report | ||
- name: Install aws-cli | ||
id: install-aws | ||
if: ${{ ! cancelled() }} | ||
run: | | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
unzip awscliv2.zip | ||
sudo ./aws/install --update | ||
- name: Upload cypress report folder to S3 | ||
if: always() | ||
run: | | ||
pwd | ||
ls -l /tmp/cypress-umesh/mochawesome-report | ||
timestamp=$(date +"%Y-%m-%d-%H-%M-%S") | ||
aws s3 cp --recursive /tmp/cypress-umesh/mochawesome-report s3://testbucket-for-triggering/reports/${timestamp}/ | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}} | ||
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}} | ||
AWS_DEFAULT_REGION: 'ap-south-1' |