Skip to content

Fix ci-cd deployment github actions #15

Fix ci-cd deployment github actions

Fix ci-cd deployment github actions #15

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
release:
types: [published]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18, 20]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: bun install
- name: Run linter
run: bun run lint
- name: Build project
run: bun run build
- name: Run tests
run: bun test
- name: Test build output
run: |
test -f dist/index.js
test -f dist/index.d.ts
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-node-${{ matrix.node-version }}
path: |
dist/
build-matrix:
runs-on: ${{ matrix.os }}
needs: test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: bun install
- name: Build project
run: bun run build
- name: Test examples
run: bun run examples