Skip to content

tmp

tmp #7651

Workflow file for this run

name: Test
on: [push]
jobs:
tsc:
runs-on: ubuntu-latest
name: TypeScript
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- name: πŸ§ͺ tsc
run: yarn types
test:
runs-on: ubuntu-latest
name: Lint & test with Node
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- name: Build SDK
run: yarn build
- name: πŸ§ͺ Lint and test with Node ${{ env.NODE_VERSION }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: |
yarn lint
yarn coverage
yarn validate-translations
- name: πŸ§ͺ Validate CommonJS bundle with Node ${{ env.NODE_VERSION }}
run: yarn validate-cjs
deploy-vite-example:
runs-on: ubuntu-latest
needs:
- tsc
- test
name: Deploy Vite Example to Vercel
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: prj_2Rq8kuNd0BmqKd2NwvkDjX9Htnx5
VITE_STREAM_API_KEY: ${{ vars.VITE_EXAMPLE_STREAM_API_KEY }}
# NODE_ENV: production
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- name: Build SDK
run: yarn build
- name: Vercel Pull/Build/Deploy (Preview)
working-directory: examples/vite
if: ${{ github.ref_name != 'master' }}
run: >
npx vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} &&
npx vercel build &&
npx vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }}
- name: Vercel Pull/Build/Deploy (Production)
working-directory: examples/vite
if: ${{ github.ref_name == 'master' }}
run: >
npx vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }} &&
npx vercel build --prod &&
npx vercel deploy --prod --prebuilt --token=${{ secrets.VERCEL_TOKEN }}