Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
arnautov-anton committed Aug 31, 2022
1 parent 8049472 commit 4bd60a5
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
22 changes: 19 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,24 +128,40 @@ jobs:
key: ${{ runner.os }}-node-modules-${{ hashFiles('./yarn.lock') }}

- name: Install packages
run: yarn install --frozen-lockfile --ignore-engines
run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts

- name: Build package
run: yarn run build
if: matrix.framework != 'vite'

# PLAYWRIGHT
- uses: actions/cache@v3
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}${{ runner.arch }}-playwright-browsers

- name: Install Playwright browsers if not cached
if: steps.playwright-cache.outputs.cache-hit != 'true' && matrix.framework == 'vite'
run: npx playwright install chromium webkit firefox

- name: Install Playwright system dependencies (always)
run: npx playwright install-deps

- name: Path version to 0.0.0-ci
run: npm version 0.0.0-ci --ignore-scripts --no-git-tag-version

- name: Verdaccio
run: |
yes | nohup npx verdaccio &>/tmp/verdaccio_log &
# Wait for `verdaccio` to boot
grep -q 'http address' <(tail -f /tmp/verdaccio_log)
# Login so we can publish packages
yes | npx npm-cli-login -u user -p password -e user@example.com -r http://localhost:4873
npm publish --registry http://localhost:4873
- name: Pack package (stream-chat-react.tgz)
working-directory: ./test-react-frameworks
run: ./pack-package.sh
if: matrix.framework != 'vite'

- name: Run ${{ matrix.framework }}.sh test
working-directory: ./test-react-frameworks/${{ matrix.framework }}
Expand Down
5 changes: 5 additions & 0 deletions test-react-frameworks/vite/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
ChannelHeader,
ChannelList,
Chat,
EmojiProvider,
MessageInput,
MessageList,
Thread,
Expand Down Expand Up @@ -53,6 +54,10 @@ const App = () => (
<ChannelList filters={filters} options={options} showChannelSearch sort={sort} />
<Channel>
<Window>
{/* @ts-ignore */}
<EmojiProvider value={{}}>
<h1>Test</h1>
</EmojiProvider>
<ChannelHeader />
<MessageList />
<MessageInput focus />
Expand Down
2 changes: 1 addition & 1 deletion test-react-frameworks/vite/vite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn create vite $FOLDER_NAME --template react-ts

cp ./App.tsx $FOLDER_NAME/src/

yarn --cwd ./$FOLDER_NAME add $PACKAGE_PATH
yarn --cwd ./$FOLDER_NAME add stream-chat-react@0.0.0-ci --registry http://localhost:4873

# Vite does not recognize variables missing "VITE_" prefix
# https://vitejs.dev/guide/env-and-mode.html#env-files
Expand Down

0 comments on commit 4bd60a5

Please sign in to comment.