Skip to content

Commit ad8f3d9

Browse files
ci: add .github/workflow specs to workspace root
ci: add .github/workflow specs to workspace root
1 parent 5bc50c1 commit ad8f3d9

File tree

6 files changed

+199
-0
lines changed

6 files changed

+199
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 'monorepo/common-setup'
2+
description: 'Sets up Bun, and installs dependencies.'
3+
inputs: {}
4+
5+
runs:
6+
using: 'composite'
7+
steps:
8+
- name: "Setup Bun"
9+
uses: oven-sh/setup-bun@v2
10+
11+
- name: "Install Dependencies"
12+
run: bun install
13+
shell: bash

.github/workflows/check.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: monorepo/check
2+
3+
on:
4+
# Runs on pull request events:
5+
pull_request: {}
6+
7+
jobs:
8+
check:
9+
strategy:
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
name: Type Check
16+
steps:
17+
- name: "Checkout Repository"
18+
uses: actions/checkout@v4
19+
20+
- name: "Common Setup"
21+
uses: ./.github/actions/common-setup
22+
23+
- name: Run Type Check
24+
run: bun run check:all

.github/workflows/ci.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: monorepo/ci
2+
3+
on:
4+
5+
# Allows manual triggering of the workflow:
6+
workflow_dispatch: {}
7+
8+
# Runs on pull request events:
9+
pull_request: {}
10+
11+
# Runs on pushes to the main branch:
12+
push:
13+
branches:
14+
- main
15+
tags:
16+
- 'v*.*.*' # e.g., v1.0.0
17+
18+
# Define jobs for format, lint, and check using common-steps:
19+
jobs:
20+
check:
21+
strategy:
22+
matrix:
23+
os: [ ubuntu-latest ]
24+
25+
runs-on: ${{ matrix.os }}
26+
27+
name: Type Check
28+
steps:
29+
- name: "Checkout Repository"
30+
uses: actions/checkout@v4
31+
32+
- name: "Common Setup"
33+
uses: ./.github/actions/common-setup
34+
35+
- name: Run Type Check
36+
run: bun run check:all
37+
38+
format:
39+
strategy:
40+
matrix:
41+
os: [ ubuntu-latest ]
42+
43+
runs-on: ${{ matrix.os }}
44+
45+
name: Format Check
46+
steps:
47+
- name: "Checkout Repository"
48+
uses: actions/checkout@v4
49+
50+
- name: "Common Setup"
51+
uses: ./.github/actions/common-setup
52+
53+
- name: Run Format Check
54+
run: bun run format:all
55+
56+
lint:
57+
strategy:
58+
matrix:
59+
os: [ ubuntu-latest ]
60+
61+
runs-on: ${{ matrix.os }}
62+
63+
name: Lint Check
64+
steps:
65+
- name: "Checkout Repository"
66+
uses: actions/checkout@v4
67+
68+
- name: "Common Setup"
69+
uses: ./.github/actions/common-setup
70+
71+
- name: Run Lint Check
72+
run: bun run lint:all
73+
74+
test:
75+
strategy:
76+
matrix:
77+
os: [ ubuntu-latest ]
78+
79+
runs-on: ${{ matrix.os }}
80+
81+
name: Run Tests
82+
steps:
83+
- name: "Checkout Repository"
84+
uses: actions/checkout@v4
85+
86+
- name: "Common Setup"
87+
uses: ./.github/actions/common-setup
88+
89+
- name: Run Format Check
90+
run: bun run test:all

.github/workflows/format.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: monorepo/format
2+
3+
on:
4+
# Runs on pull request events:
5+
pull_request: {}
6+
7+
jobs:
8+
format:
9+
strategy:
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
name: Format Check
16+
steps:
17+
- name: "Checkout Repository"
18+
uses: actions/checkout@v4
19+
20+
- name: "Common Setup"
21+
uses: ./.github/actions/common-setup
22+
23+
- name: Run Format Check
24+
run: bun run format:all

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: monorepo/lint
2+
3+
on:
4+
# Runs on pull request events:
5+
pull_request: {}
6+
7+
jobs:
8+
lint:
9+
strategy:
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
name: Lint Check
16+
steps:
17+
- name: "Checkout Repository"
18+
uses: actions/checkout@v4
19+
20+
- name: "Common Setup"
21+
uses: ./.github/actions/common-setup
22+
23+
- name: Run Lint Check
24+
run: bun run lint:all

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: monorepo/test
2+
3+
on:
4+
# Runs on pull request events:
5+
pull_request: {}
6+
7+
jobs:
8+
test:
9+
strategy:
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
13+
runs-on: ${{ matrix.os }}
14+
15+
name: Run Tests
16+
steps:
17+
- name: "Checkout Repository"
18+
uses: actions/checkout@v4
19+
20+
- name: "Common Setup"
21+
uses: ./.github/actions/common-setup
22+
23+
- name: Run Format Check
24+
run: bun run test:all

0 commit comments

Comments
 (0)