Skip to content

Commit 8672931

Browse files
committed
feat: add CI setup and type-checking to workflows
1 parent 9497e8c commit 8672931

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Setup Continuous Integration"
2+
description: "Cache Dependencies"
3+
runs:
4+
using: "composite"
5+
steps:
6+
- name: Setup Node.js
7+
uses: actions/setup-node@v3
8+
with:
9+
node-version: ${{ env.NODE_VERSION }}
10+
cache: "yarn"
11+
12+
- name: Cache NPM Dependencies
13+
uses: actions/cache@v3
14+
id: cache-primes
15+
with:
16+
path: node_modules
17+
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
18+
19+
- name: Install Dependencies
20+
run: yarn install
21+
shell: bash

.github/workflows/pr-checks.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Pull Request Checks
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize]
6+
7+
env:
8+
NODE_VERSION: 20.11.0
9+
10+
jobs:
11+
linting:
12+
name: Lint
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v3
17+
18+
- name: Setup Continuous integration
19+
uses: ./.github/actions/ci-setup
20+
21+
- name: Lint Application
22+
run: yarn lint
23+
24+
type-check:
25+
name: Apps/Web Types
26+
runs-on: ubuntu-20.04
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v3
30+
31+
- name: Setup Continuous Integration
32+
uses: ./.github/actions/ci-setup
33+
34+
- name: Check Application Types
35+
run: yarn type-check
36+
37+
build:
38+
name: Build
39+
runs-on: ubuntu-20.04
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v3
43+
44+
- name: Setup Continuous Integration
45+
uses: ./.github/actions/ci-setup
46+
47+
- name: Copy Env File
48+
run: cp .env.example .env
49+
50+
- name: MongoDB in GitHub Actions
51+
uses: supercharge/[email protected]
52+
with:
53+
mongodb-username: username
54+
mongodb-password: password
55+
mongodb-db: test
56+
57+
- name: Build Application
58+
run: yarn build

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"app:build": "turbo app:build",
77
"dev": "turbo dev",
88
"lint": "turbo lint",
9+
"type-check": "turbo type-check",
910
"format": "prettier --write \"**/*.{ts,tsx,md}\""
1011
},
1112
"devDependencies": {

0 commit comments

Comments
 (0)