docs: update README.md #114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Check | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
types: [opened, synchronize] | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9.3.0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: pnpm | |
- name: Cache pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
lint: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9.3.0 | |
- name: Restore cached pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Lint Check | |
run: pnpm lint | |
type-check: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9.3.0 | |
- name: Restore cached pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Type Check | |
run: pnpm typecheck | |
unit-test: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9.3.0 | |
- name: Restore cached pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Unit Test | |
run: pnpm test | |
- name: Coverage | |
run: pnpm coverage | |
- name: Upload Report to Coveralls | |
uses: coverallsapp/[email protected] | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
flag-name: Unit Test | |
parallel: true | |
build: | |
needs: setup | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pnpm | |
uses: pnpm/action-setup@v3 | |
with: | |
version: 9.3.0 | |
- name: Restore cached pnpm store | |
uses: actions/cache@v4 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm-store- | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Build | |
run: pnpm build | |
finish: | |
needs: unit-test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel-finished: true | |
carryforward: "run-1,run-2" |