From d8ad90904595bda13d2e10590613b4d947d38d8e Mon Sep 17 00:00:00 2001 From: martincupela Date: Wed, 15 Nov 2023 07:57:52 +0100 Subject: [PATCH] chore(workflows): move e2e job to a separate workflow --- .github/workflows/ci.yml | 45 ----------------------------------- .github/workflows/e2e.yml | 49 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/e2e.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b69600b7..72b30a429 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,51 +23,6 @@ jobs: - name: ๐Ÿงช tsc run: yarn types --noEmit - e2e: - runs-on: ubuntu-latest - name: End-to-end tests - steps: - - uses: actions/checkout@v3 - - - name: ๐Ÿ’พ Cache Dependencies - uses: actions/cache@v3 - with: - path: ./node_modules - key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('**/yarn.lock') }} - - - name: ๐Ÿ”จ Install Dependencies - run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts - - - name: โš—๏ธ End-to-end tests - run: | - npx playwright install - npx playwright install-deps - yarn e2e-fixtures - # running with --browser=all causes failures - yarn e2e --browser=chromium - yarn e2e --browser=webkit - yarn e2e --browser=firefox - env: - E2E_JUMP_TO_MESSAGE_CHANNEL: jump-to-message - E2E_ADD_MESSAGE_CHANNEL: add-message - E2E_TEST_USER_1: test-user-1 - E2E_TEST_USER_2: test-user-2 - E2E_APP_KEY: ${{ secrets.E2E_APP_KEY }} - E2E_APP_SECRET: ${{ secrets.E2E_APP_SECRET }} - E2E_TEST_USER_1_TOKEN: ${{ secrets.E2E_TEST_USER_1_TOKEN }} - E2E_TEST_USER_2_TOKEN: ${{ secrets.E2E_TEST_USER_2_TOKEN }} - E2E_ADDITIONAL_CHANNELS: mr-channel-1, mr-channel-2, edit-message-channel, pin-message-channel - E2E_LONG_MESSAGE_LISTS_CHANNEL: navigate-long-message-lists - E2E_ATTACHMENT_SIZING_CHANNEL: attachment-sizing - - - name: ๐ŸŽฅ Upload Artifacts - uses: actions/upload-artifact@v3 - if: ${{ always() }} - with: - name: E2E_Artifacts - path: ./test-results - retention-days: 1 - test: runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 000000000..c6c20fd46 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,49 @@ +name: E2E + +on: [push] + +jobs: + e2e: + runs-on: ubuntu-latest + name: End-to-end tests + steps: + - uses: actions/checkout@v3 + + - name: ๐Ÿ’พ Cache Dependencies + uses: actions/cache@v3 + with: + path: ./node_modules + key: ${{ runner.os }}-${{ matrix.node }}-modules-${{ hashFiles('**/yarn.lock') }} + + - name: ๐Ÿ”จ Install Dependencies + run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts + + - name: โš—๏ธ End-to-end tests + run: | + npx playwright install + npx playwright install-deps + yarn e2e-fixtures + # running with --browser=all causes failures + yarn e2e --browser=chromium + yarn e2e --browser=webkit + yarn e2e --browser=firefox + env: + E2E_JUMP_TO_MESSAGE_CHANNEL: jump-to-message + E2E_ADD_MESSAGE_CHANNEL: add-message + E2E_TEST_USER_1: test-user-1 + E2E_TEST_USER_2: test-user-2 + E2E_APP_KEY: ${{ secrets.E2E_APP_KEY }} + E2E_APP_SECRET: ${{ secrets.E2E_APP_SECRET }} + E2E_TEST_USER_1_TOKEN: ${{ secrets.E2E_TEST_USER_1_TOKEN }} + E2E_TEST_USER_2_TOKEN: ${{ secrets.E2E_TEST_USER_2_TOKEN }} + E2E_ADDITIONAL_CHANNELS: mr-channel-1, mr-channel-2, edit-message-channel, pin-message-channel + E2E_LONG_MESSAGE_LISTS_CHANNEL: navigate-long-message-lists + E2E_ATTACHMENT_SIZING_CHANNEL: attachment-sizing + + - name: ๐ŸŽฅ Upload Artifacts + uses: actions/upload-artifact@v3 + if: ${{ always() }} + with: + name: E2E_Artifacts + path: ./test-results + retention-days: 1