Skip to content

Commit

Permalink
Add CI on push/PR
Browse files Browse the repository at this point in the history
  • Loading branch information
sleepyfran committed Jul 25, 2024
1 parent 9214b79 commit a8b7cda
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint, format, build

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x, 21.x, 22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- run: yarn
- run: yarn ci
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn typecheck && yarn lint && yarn format
yarn format
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"version": "0.0.0",
"type": "module",
"scripts": {
"ci": "yarn typecheck && yarn lint && yarn format",
"dev": "yarn workspace @echo/web vite",
"build": "yarn workspace @echo/web tsc && vite build",
"format": "prettier --check \"packages/**/*.{ts, tsx}\"",
Expand Down

0 comments on commit a8b7cda

Please sign in to comment.