Skip to content

Commit

Permalink
chore: setup github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreBerger committed Jan 29, 2024
1 parent c77bbba commit 610a37f
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 1 deletion.
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: 🚜 CI
on:
push:
branches:
- main
- dev
pull_request: {}

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
lint:
name: ⬣ ESLint
runs-on: ubuntu-22.04
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 20

- name: 🍞 Setup bun
uses: oven-sh/setup-bun@v1

- name: 📥 Download deps
uses: bun install

- name: 🔬 Lint
run: bun run lint

typecheck:
name: ʦ TypeScript
runs-on: ubuntu-22.04
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 20

- name: 🍞 Setup bun
uses: oven-sh/setup-bun@v1

- name: 📥 Download deps
uses: bun install

- name: 🔎 Type check
run: bun run typecheck --if-present

vitest:
name: ⚡ Vitest
runs-on: ubuntu-22.04
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v3
with:
node-version: 20

- name: 🍞 Setup bun
uses: oven-sh/setup-bun@v1

- name: 📥 Download deps
uses: bun install

- name: 🏄 Copy test env vars
run: cp .env.example .env

- name: ⚡ Run vitest
run: npm run test -- --coverage
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"test:ui": "vitest --ui",
"coverage": "vitest --coverage",
"start": "bun run build && node dist/src/server.js",
"typecheck": "tsc -p --noEmit --pretty",
"typecheck": "tsc --noEmit --pretty",
"lint": "eslint .",
"format": "prettier -w .",
"build": "tsc",
Expand Down

0 comments on commit 610a37f

Please sign in to comment.