Skip to content

Commit

Permalink
ci: add GitHub Actions CI workflow (#14)
Browse files Browse the repository at this point in the history
Add CI workflows
  • Loading branch information
BlankParticle authored Apr 7, 2024
1 parent c97d4a0 commit f824953
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/ci-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: check-and-test-pull-requests

on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize

concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.head.sha }}

jobs:
check:
name: Check and Build
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout Code 🛎
uses: actions/checkout@v4

- name: Setup pnpm 📦
uses: pnpm/action-setup@v3
with:
version: 8

- name: Setup Node.js 🟩
uses: actions/setup-node@v4
with:
cache: 'pnpm'
node-version: '20'

- name: Install Dependencies 📦
run: pnpm install

- name: Check 🚨
run: pnpm ci:run
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
"scripts": {
"build": "pnpm -r run build",
"test": "pnpm -r run test",
"format": "prettier --write ."
"check": "pnpm -r run check",
"format": "prettier --write .",
"format:check": "prettier --check .",
"ci:run": "pnpm format:check && pnpm check && pnpm test"
},
"keywords": [
"u22n"
Expand Down
1 change: 1 addition & 0 deletions packages/mailtools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"scripts": {
"build": "tsup",
"dev": "tsup",
"check": "tsc --noEmit",
"start": "tsx playground/index.ts",
"test": "vitest run",
"test:ui": "vitest --ui",
Expand Down

0 comments on commit f824953

Please sign in to comment.