Merge pull request #466 from GetStream/jump-to-latest-message-edge-case #722
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests and release | |
on: | |
push: | |
branches: | |
- master | |
- beta | |
- test | |
- theming-v2 | |
- angular-v16-support | |
pull_request: | |
branches: | |
- master | |
- beta | |
- test | |
- theming-v2 | |
jobs: | |
workflow: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: | | |
npm ci | |
- name: Build | |
run: | | |
npm run build:prod | |
- name: Linting | |
run: | | |
npm run lint | |
- name: Unit tests | |
run: | | |
npm run test:ci | |
# - name: E2e tests | |
# env: | |
# STREAM_API_KEY: ${{ secrets.API_KEY }} | |
# STREAM_USER_ID: ${{ secrets.USER_ID }} | |
# STREAM_USER_TOKEN: ${{ secrets.USER_TOKEN }} | |
# run: | | |
# npm run e2e:ci | |
- name: Release | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
run: npx semantic-release | |
- name: Copy docs from stream-chat-css | |
run: npm run copy-css-docs | |
- name: Generate docs | |
run: | | |
npm run generate-docs | |
- name: Push to docusaurus | |
uses: GetStream/push-stream-chat-docusaurus-action@main | |
with: | |
target-branch: ${{ github.ref == 'refs/heads/master' && 'production' || 'staging' }} | |
env: | |
DOCUSAURUS_GH_TOKEN: ${{ secrets.DOCUSAURUS_GH_TOKEN }} |