Skip to content

Commit

Permalink
chore: separate e2e workflow file (#2172)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinCupela committed Nov 15, 2023
1 parent 128b426 commit 25e66dc
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 46 deletions.
45 changes: 0 additions & 45 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
> building chat applications.
[![NPM](https://img.shields.io/npm/v/stream-chat-react.svg)](https://www.npmjs.com/package/stream-chat-react)
[![build](https://github.com/GetStream/stream-chat-react/workflows/test/badge.svg)](https://github.com/GetStream/stream-chat-react/actions)
[![build](https://github.com/GetStream/stream-chat-react/actions/workflows/ci.yml/badge.svg)](https://github.com/GetStream/stream-chat-react/actions)
[![Component Reference](https://img.shields.io/badge/docs-component%20reference-blue.svg)](https://getstream.io/chat/docs/sdk/react/)
[![codecov](https://codecov.io/gh/GetStream/stream-chat-react/branch/master/graph/badge.svg)](https://codecov.io/gh/GetStream/stream-chat-react)

Expand Down

0 comments on commit 25e66dc

Please sign in to comment.