-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(monorepo): initial github actions workflow for code quality chec…
…ks (#18)
- Loading branch information
1 parent
7bc2935
commit 94129da
Showing
8 changed files
with
105 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 'Install' | ||
description: 'Sets up Node, and installs dependencies' | ||
|
||
inputs: | ||
fetch-depth: | ||
default: '1' | ||
required: false | ||
persist-credentials: | ||
default: true | ||
required: false | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install pnpm package manager | ||
uses: pnpm/action-setup@v3 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: 'package.json' | ||
cache: pnpm | ||
|
||
- name: Install dependencies | ||
shell: bash | ||
run: pnpm install --ignore-scripts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: code-quality | ||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
pull_request: | ||
|
||
jobs: | ||
lint: | ||
name: 'ESLint' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/composite-actions/install | ||
|
||
- name: Run ESLint check | ||
run: pnpm run lint | ||
|
||
type-check: | ||
name: 'Type Check' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/composite-actions/install | ||
|
||
- name: Run type checks | ||
run: pnpm run type-check | ||
|
||
test: | ||
name: 'Unit Test' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install | ||
uses: ./.github/composite-actions/install | ||
|
||
- name: Run unit test | ||
run: pnpm run test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
engine-strict=true | ||
|
||
save-workspace-protocol=rolling | ||
save-prefix='' | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,21 @@ | ||
{ | ||
"$schema": "https://turbo.build/schema.json", | ||
"pipeline": { | ||
"build": { | ||
"dependsOn": ["^build"] | ||
}, | ||
"clean": { | ||
"cache": false | ||
}, | ||
"lint": {}, | ||
"code-gen": {}, | ||
"lint": { | ||
"dependsOn": ["code-gen"] | ||
}, | ||
"test": { | ||
"outputs": ["./coverage/**"] | ||
}, | ||
"type-check": { | ||
"dependsOn": ["code-gen"] | ||
} | ||
} | ||
} |