-
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.
Merge pull request #1 from tuatmcc/feat/ci
feat/ci
- Loading branch information
Showing
12 changed files
with
138 additions
and
18 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 |
---|---|---|
@@ -1 +1,2 @@ | ||
KIBELA_API_URL= | ||
KIBELA_ACCESS_TOKEN= |
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,102 @@ | ||
name: Check | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
run_install: false | ||
|
||
- name: Setup | Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
- name: Setup | Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run | Lint | ||
run: pnpm run lint | ||
|
||
typecheck: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
run_install: false | ||
|
||
- name: Setup | Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
- name: Setup | Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Run | Type Check | ||
run: pnpm run typecheck | ||
|
||
check-schema: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
- name: Setup | Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup | Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
run_install: false | ||
|
||
- name: Setup | Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: .nvmrc | ||
cache: pnpm | ||
|
||
- name: Setup | Install Dependencies | ||
run: pnpm install --frozen-lockfile | ||
|
||
- name: Setup | Generate Type for GraphQL | ||
run: pnpm codegen | ||
|
||
- name: Run | Check Diff | ||
run: | | ||
fail=0 | ||
# Check Type | ||
if [ "$(git diff --ignore-space-at-eol --text src/graphql | wc -l)" -gt "0" ]; then | ||
echo "Detected uncommitted changes in type definitions. See status below:" | ||
git diff --ignore-space-at-eol --text app/libs/database.ts | ||
fail=1 | ||
fi | ||
if [ "$fail" -gt "0" ]; then | ||
echo "Detected uncommitted changes in schema definitions. Please commit the changes before pushing." | ||
exit 1 | ||
fi |
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 @@ | ||
save-exact = true |
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 @@ | ||
22.10.0 |
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 |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
"start": "next start", | ||
"lint": "biome check .", | ||
"fmt": "biome check . --write", | ||
"typecheck": "tsc --noEmit", | ||
"codegen": "graphql-codegen --config codegen.ts", | ||
"get-graphql-schema": "get-graphql-schema" | ||
}, | ||
|
@@ -35,5 +36,6 @@ | |
"postcss": "^8", | ||
"tailwindcss": "^3.4.1", | ||
"typescript": "^5" | ||
} | ||
}, | ||
"packageManager": "[email protected]" | ||
} |
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
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