Skip to content

[ECO-4904] Add Unified Test Suite CI action #1552

[ECO-4904] Add Unified Test Suite CI action

[ECO-4904] Add Unified Test Suite CI action #1552

Workflow file for this run

name: Build and test
on:
pull_request:
push:
branches:
- main
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v1
with:
node-version: 20
- run: npm ci
- run: npm audit --production
format-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v1
with:
node-version: 20
- run: npm ci
- run: npm run format:check
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v1
with:
node-version: 20
- run: npm ci
- run: npm run lint
test-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v1
with:
node-version: 20
- run: npm ci
- run: npm run test:typescript
test:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v1
with:
node-version: 20
- run: npm ci
- run: npm run test
- uses: davelosert/vitest-coverage-report-action@v2
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == 'ably/ably-chat-js' && always()
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v1
with:
node-version: 20
- run: npm ci
- run: npm run build
demo-app:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-node@v1
with:
node-version: 20
- name: npm ci (lib)
run: npm ci
- name: npm build (lib)
run: npm run build
- name: npm ci (demo)
run: npm ci
working-directory: demo
- name: npm ci (ably-token-request)
run: npm ci
working-directory: demo/api/ably-token-request
- name: 'npm build (demo)'
run: npm run build
working-directory: demo