Skip to content

use n sources

use n sources #1589

Workflow file for this run

name: CI
on: push
jobs:
unit-test:
runs-on: ubuntu-latest
name: Unit Tests
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22.x"
- name: npm ci
run: npm ci
- name: Unit tests
run: npm run test:unit
integration-test:
runs-on: ubuntu-latest
name: Integration Tests
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: "22.x"
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:integration
e2e-test:
runs-on: ${{ matrix.os }}-latest
strategy:
matrix:
os:
- ubuntu
- windows
node:
- "18.x" # Oldest supported lts
- "20.x" # Newest lts
- "22.x" # Latest
name: E2E Tests
steps:
- uses: actions/checkout@v4
- name: setup node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: install deps
run: npm ci
- name: build
run: npm run build
- name: run tests
run: npm run test:e2e
release:
runs-on: ubuntu-latest
needs:
- unit-test
- integration-test
- e2e-test
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: npm install
run: npm install
- name: Build
run: npm run build
- name: Release
uses: cycjimmy/semantic-release-action@v3
with:
extra_plugins: |
@semantic-release/changelog
@semantic-release/git
branch: master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}