Update README #15
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: Checks | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
id: setup-bun | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules/ | |
key: ${{ runner.os }}-${{ steps.setup-bun.bun-version }}-node-modules | |
- name: Install deps | |
run: bun install | |
- name: Check formatting | |
run: bun run fmt-check | |
- name: ESLint | |
run: bun run lint | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
id: setup-bun | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules/ | |
key: ${{ runner.os }}-${{ steps.setup-bun.bun-version }}-node-modules | |
- name: Install deps | |
run: bun install | |
- name: Typecheck | |
run: bun run typecheck | |
build: | |
runs-on: ubuntu-latest | |
needs: | |
- lint | |
- typecheck | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
id: setup-bun | |
- name: Cache node_modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules/ | |
key: ${{ runner.os }}-${{ steps.setup-bun.bun-version }}-node-modules | |
- name: Install deps | |
run: bun install | |
- name: Build | |
run: bun run build | |
- name: Archive dist | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist | |
path: dist |