refactor: use biome instead of eslint flat config #22
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/[email protected] | |
- name: Setup biome | |
uses: biomejs/[email protected] | |
with: | |
version: latest | |
- name: Run biome | |
run: biome ci ./src | |
typecheck: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout branch | |
uses: actions/[email protected] | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
- name: Install node | |
uses: actions/[email protected] | |
with: | |
node-version: lts/* | |
cache: pnpm # Package manager should be pre-installed | |
- name: Setup globally | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Typecheck | |
run: nr typecheck | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node: [lts/*] | |
os: [ubuntu-latest] # adding "windows-latest" and "macos-latest" will only slows down CI/CD | |
fail-fast: false | |
steps: | |
- name: Checkout branch | |
uses: actions/[email protected] | |
- name: Install pnpm | |
uses: pnpm/action-setup@v3 | |
- name: Set node version to ${{ matrix.node }} | |
uses: actions/[email protected] | |
with: | |
node-version: ${{ matrix.node }} | |
cache: pnpm | |
- name: Setup | |
run: npm i -g @antfu/ni | |
- name: Install | |
run: nci | |
- name: Build | |
run: nr build | |
- name: Test | |
run: nr test |