Skip to content

refactor: delete module unbuild, add tsup, edit package.json, and rename config #34

refactor: delete module unbuild, add tsup, edit package.json, and rename config

refactor: delete module unbuild, add tsup, edit package.json, and rename config #34

Workflow file for this run

name: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set node version to 18
uses: actions/setup-node@v3
with:
node-version: 22
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 10
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Installing modules
run: pnpm i
- name: Building module
run: pnpm build
- name: Running eslint
run: npx eslint
- name: Running typecheck
run: pnpm run typecheck
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 10
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Installing modules
run: pnpm i
- name: Running tests
run: pnpm run test:coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./
fail_ci_if_error: true
files: ./coverage/cobertura-coverage.xml