Skip to content

chore(ci): add github actions #1

chore(ci): add github actions

chore(ci): add github actions #1

Workflow file for this run

name: Test
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
node-version: [16, 18, 20]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: Intall
run: pnpm install
- name: Lint
run: pnpm run lint
- name: Typescript Check
run: pnpm run ts-check
- name: Build
run: pnpm build
- name: Test
run: pnpm run test
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: run-${{ matrix.os }}-${{ matrix.node-version }}
parallel: true
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true