From 2ff59f27a6a3ee9e8b706f7f9be50eabc1361846 Mon Sep 17 00:00:00 2001 From: Maciej Kupiec <115480562+MaciejMDDV@users.noreply.github.com> Date: Fri, 20 Dec 2024 10:48:31 +0100 Subject: [PATCH] Adding macOS to workflow --- .github/workflows/e2e-feature-branch.yml | 42 ++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/.github/workflows/e2e-feature-branch.yml b/.github/workflows/e2e-feature-branch.yml index 302dfd5363..395ddf66d1 100644 --- a/.github/workflows/e2e-feature-branch.yml +++ b/.github/workflows/e2e-feature-branch.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [Windows, Linux] + os: [Windows, Linux, macOS] if: startsWith(github.head_ref || github.ref, 'CP-') environment: development steps: @@ -54,6 +54,38 @@ jobs: KOMPAKT_OS_UPDATE_DEV_TOKEN: ${{ secrets.KOMPAKT_OS_UPDATE_DEV_TOKEN }} run: | printenv > .env + - name: Setup environment variables for Linux + if: matrix.os == 'Linux' + env: + E2ECI: "true" + TEST_GITHUB_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }} + TEST_BINARY_PATH: "../mudita-center/release/mac/Mudita Center.app/Contents/MacOS/Mudita Center" + PHRASE_API_KEY: ${{ secrets.PHRASE_API_KEY }} + PHRASE_API_URL: ${{ secrets.PHRASE_API_URL }} + PHRASE_API_KEY_DEV: ${{ secrets.PHRASE_API_KEY_DEV }} + MUDITA_CENTER_SERVER_URL: ${{ secrets.MUDITA_CENTER_SERVER_URL }} + MUDITA_CENTER_SERVER_V2_URL: ${{ secrets.MUDITA_CENTER_SERVER_V2_URL }} + ROLLBAR_TOKEN: ${{ secrets.ROLLBAR_TOKEN }} + RELEASES_REPOSITORY_NAME: ${{ secrets.RELEASES_REPOSITORY_NAME }} + PRERELEASES_ENABLED: ${{ secrets.PRERELEASES_ENABLED }} + GITHUB_ACCESS_TOKEN: ${{ secrets.MC_GITHUB_ACCESS_TOKEN }} + LOGIN_MICROSOFT_ONLINE_CLIENT_ID: ${{ secrets.LOGIN_MICROSOFT_ONLINE_CLIENT_ID }} + FONTS_DIRECTORY_URL: ${{ secrets.FONTS_DIRECTORY_URL }} + FRESHDESK_API_URL: ${{ secrets.FRESHDESK_API_URL }} + FRESHDESK_API_TOKEN: ${{ secrets.FRESHDESK_API_TOKEN }} + ANALYTICS_ENABLED: ${{ secrets.ANALYTICS_ENABLED }} + ANALYTICS_API_URL: ${{ secrets.ANALYTICS_API_URL }} + ANALYTICS_API_SITE_ID: ${{ secrets.ANALYTICS_API_SITE_ID }} + FEATURE_TOGGLE_ENVIRONMENT: ${{ secrets.FEATURE_TOGGLE_ENVIRONMENT }} + STATIC_CONFIGURATION_FILE_PATH: ${{ secrets.STATIC_CONFIGURATION_FILE_PATH }} + DEV_REDUX_LOGGER_ENABLED: ${{ secrets.DEV_REDUX_LOGGER_ENABLED }} + DEV_DEVICE_LOGGER_ENABLED: ${{ secrets.DEV_DEVICE_LOGGER_ENABLED }} + FEATURE_TOGGLE_RELEASE_ENVIRONMENT: ${{ secrets.FEATURE_TOGGLE_RELEASE_ENVIRONMENT }} + MOCK_SERVICE_ENABLED: ${{ secrets.MOCK_SERVICE_ENABLED }} + NEW_HELP_ENABLED: ${{ secrets.NEW_HELP_ENABLED }} + KOMPAKT_OS_UPDATE_DEV_TOKEN: ${{ secrets.KOMPAKT_OS_UPDATE_DEV_TOKEN }} + run: | + printenv > .env - name: Setup environment variables for Windows if: matrix.os == 'Windows' env: @@ -89,8 +121,8 @@ jobs: SET > .env - name: Setup dependencies run: npm run setup - - name: Build App for Linux - if: matrix.os == 'Linux' + - name: Build App for Linux/Mac + if: matrix.os != 'Windows' run: | export NODE_OPTIONS="--max-old-space-size=4096" npm run app:dist @@ -111,3 +143,7 @@ jobs: run: | cd apps/mudita-center-e2e npm run e2e:test:cicd:standalone + - name: Run E2E tests headless on Mac + if: matrix.os == 'macOS' + run: | + npm run e2e:test:standalone