Skip to content

refactor: use tsup for bundling #28

refactor: use tsup for bundling

refactor: use tsup for bundling #28

Workflow file for this run

name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
jobs:
block-autosquash:
if: github.event.pull_request.draft == false
name: block-autosquash
runs-on: ubuntu-latest
steps:
- name: Block autosquash commits
uses: xt0rted/block-autosquash-commits-action@v2.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
build:
if: github.event.pull_request.draft == false
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- uses: actions/cache@v2
id: npm-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
with:
path: '**/build'
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Install dependencies
if: steps.npm-cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- name: Build artifacts
run: npm run build
test_unit:
name: test:unit
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- uses: actions/cache@v2
id: npm-cache
with:
path: '**/node_modules'
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
- uses: actions/cache@v2
with:
path: '**/build'
key: ${{ runner.os }}-build-${{ github.sha }}
- name: Run tests
run: npm run test