RC E2E testing #8
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: RC E2E testing | |
on: workflow_dispatch | |
env: | |
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
AWS_IAM_ROLE_ARN: ${{ secrets.AWS_IAM_ROLE_ARN }} | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
RCArtifactsDownload: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
with: | |
fetch-depth: 0 | |
- name: Setup pnpm | |
uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 | |
- name: Setup node | |
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | |
with: | |
node-version-file: ".nvmrc" | |
cache: "pnpm" | |
- name: Install dependencies | |
run: pnpm install | |
- name: Setup AWS credentials | |
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 | |
with: | |
role-to-assume: ${{ env.AWS_IAM_ROLE_ARN }} | |
aws-region: ${{ env.AWS_REGION }} | |
# Download an artifact from AWS S3 bucket and use it to run E2E | |
- name: Run E2E using nightly artifacts | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
aws s3 cp s3://${{ env.AWS_S3_BUCKET_NAME }}/modelers/latest-studio-pro.json ./latest-studio-pro.json | |
URL=$(jq -r '.url' latest-studio-pro.json) | |
echo $URL | |
SP_VERSION=$(echo $URL | sed -E 's/.*(-([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)-).*/\2/') | |
echo $SP_VERSION | |
echo "Starting E2E testing execution..." | |
MENDIX_VERSION=$SP_VERSION RC=true pnpm -r --workspace-concurrency=1 run e2e | |
- name: "Fixing files permissions" | |
if: failure() | |
run: | | |
sudo find ${{ github.workspace }}/packages/* -type d -exec chmod 755 {} \; | |
sudo find ${{ github.workspace }}/packages/* -type f -exec chmod 644 {} \; | |
- name: "Generating test report" | |
working-directory: ./automation/run-e2e | |
if: failure() | |
run: | | |
report_count=$(find ../../packages -type f -path "*/cypress/results/*" -name "*.json" | wc -l) | |
if [ $report_count -gt 0 ]; | |
then | |
pnpm run report:merge | |
pnpm run report:generate | |
fi | |
- name: "Archive test screenshot diff results and test report" | |
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 | |
if: failure() | |
with: | |
name: test-screenshot-results | |
path: | | |
${{ github.workspace }}/packages/**/tests/e2e/screenshot-results/diff/**/*.png | |
${{ github.workspace }}/packages/**/tests/e2e/screenshot-results/TESTFAIL_*.png | |
${{ github.workspace }}/packages/**/cypress-visual-screenshots/diff/*.png | |
${{ github.workspace }}/packages/**/cypress-visual-screenshots/comparison/*.png | |
${{ github.workspace }}/packages/**/cypress/videos/*.mp4 | |
${{ github.workspace }}/automation/run-e2e/mochawesome-report/ | |
if-no-files-found: error | |