diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dd5888cd5..7071cd1b9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/test-react-frameworks/vite/App.tsx b/test-react-frameworks/vite/App.tsx index a144dbabf1..bfd4b56688 100644 --- a/test-react-frameworks/vite/App.tsx +++ b/test-react-frameworks/vite/App.tsx @@ -7,6 +7,7 @@ import { ChannelHeader, ChannelList, Chat, + EmojiProvider, MessageInput, MessageList, Thread, @@ -53,6 +54,10 @@ const App = () => ( + {/* @ts-ignore */} + +

Test

+
diff --git a/test-react-frameworks/vite/vite.sh b/test-react-frameworks/vite/vite.sh index aeb660e2b1..d6a816b5fb 100755 --- a/test-react-frameworks/vite/vite.sh +++ b/test-react-frameworks/vite/vite.sh @@ -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