Skip to content

Commit a19a929

Browse files
committed
Add github workflows
1 parent 044484c commit a19a929

4 files changed

Lines changed: 55 additions & 1 deletion

File tree

.github/actions/checks/action.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Main Bun project checks"
2+
description: "Run formatting, linting, and testing on code"
3+
4+
runs:
5+
using: "composite"
6+
steps:
7+
- name: Checkout repository
8+
uses: actions/checkout@v4
9+
10+
- uses: oven-sh/setup-bun@v2
11+
12+
- name: Install dependencies
13+
run: bun install
14+
shell: bash
15+
16+
- name: Formatting
17+
run: bun run format:check:all
18+
shell: bash
19+
20+
- name: Linting
21+
run: bun run lint:all
22+
shell: bash
23+
24+
- name: Testing
25+
run: bun run test:all
26+
shell: bash
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: CI on Pull Request
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_and_test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Run checks
14+
uses: ./.github/actions/checks

.github/workflows/push-checks.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: CI on commits to main
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build_and_test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Run checks
14+
uses: ./.github/actions/checks

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"format:shared": "bun run --filter @cssg/shared format",
3030
"format:frontend": "bun run --filter frontend format",
3131
"format:backend": "bun run --filter backend format",
32-
"format:check": "prettier --check .",
32+
"format:check:all": "bun run --filter \"*\" format:check",
3333
"test:all": "bun run --filter \"*\" test",
3434
"test:shared": "bun run --filter shared test",
3535
"test:backend": "bun run --filter backend test"

0 commit comments

Comments
 (0)