Skip to content

RC E2E testing

RC E2E testing #17

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@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
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: Install Playwright Browsers
run: pnpm exec playwright install --with-deps chromium
- name: Setup AWS credentials
uses: aws-actions/configure-aws-credentials@fff2104678c2113fcefb9ae8294dc7ccb803e27c
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 '.file' 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
aws s3 cp s3://${{ env.AWS_S3_BUCKET_NAME }}/runtimes/mxbuild-${SP_VERSION}.tar.gz ${{ github.workspace }}/automation/run-e2e/docker/mxbuild-${SP_VERSION}.tar.gz
aws s3 cp s3://${{ env.AWS_S3_BUCKET_NAME }}/runtimes/mendix-${SP_VERSION}.tar.gz ${{ github.workspace }}/automation/run-e2e/docker/mendix-${SP_VERSION}.tar.gz
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: "Archive test screenshot diff results"
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
if: failure()
with:
name: test-screenshot-results-1
path: |
${{ github.workspace }}/packages/**/**/test-results/**/*.png
${{ github.workspace }}/packages/**/**/test-results/**/*.zip
if-no-files-found: error