This repository has been archived by the owner on Sep 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 61
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 #644 from pavlovcik/refactor/general
Refactor/general
- Loading branch information
Showing
214 changed files
with
7,733 additions
and
17,842 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
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Run E2E Tests | ||
|
||
on: | ||
- workflow_dispatch | ||
- push | ||
|
||
jobs: | ||
e2e-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20.10.0" | ||
|
||
- name: Install | ||
run: npm install bun -g && bun install | ||
|
||
- name: Build | ||
run: bun tsc | ||
|
||
- name: Test | ||
env: | ||
|
||
APP_ID: ${{ secrets.APP_ID }} | ||
# CHATGPT_USER_PROMPT_FOR_IMPORTANT_WORDS: | ||
# CHATGPT_USER_PROMPT_FOR_MEASURE_SIMILARITY: | ||
DISQUALIFY_TIME: "7 days" | ||
FOLLOW_UP_TIME: "4 days" | ||
# IMPORTANT_WORDS_AI_TEMPERATURE: | ||
LOG_ENVIRONMENT: "production" | ||
# LOG_LEVEL: | ||
# MEASURE_SIMILARITY_AI_TEMPERATURE: | ||
# OPENAI_API_HOST: | ||
# OPENAI_API_KEY: | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
# SIMILARITY_THRESHOLD: | ||
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }} | ||
SUPABASE_URL: ${{ secrets.SUPABASE_URL }} | ||
TEST_ADMIN_PAT: ${{ secrets.TEST_ADMIN_PAT }} | ||
TEST_ORGANIZATION_NAME: ${{ secrets.TEST_ORGANIZATION_NAME }} | ||
TEST_OUTSIDE_COLLABORATOR_PAT: ${{ secrets.TEST_OUTSIDE_COLLABORATOR_PAT }} | ||
TEST_REPOSITORY_NAME: ${{ secrets.TEST_REPOSITORY_NAME }} | ||
WEBHOOK_PROXY_URL: ${{ secrets.WEBHOOK_PROXY_URL }} | ||
WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }} | ||
X25519_PRIVATE_KEY: "QCDb30UHUkwJAGhLWC-R2N0PiEbd4vQY6qH2Wloybyo" | ||
|
||
run: "bun 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
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,30 @@ | ||
name: Knip | ||
|
||
on: | ||
pull_request: | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
run-knip: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.10.0 | ||
|
||
- name: Install toolchain | ||
run: npm install -g bun && bun install | ||
|
||
- name: Report knip results to pull request | ||
uses: Codex-/knip-reporter@v2 | ||
with: | ||
verbose: true | ||
comment_id: ${{ github.workflow }}-reporter | ||
command_script_name: knip-ci | ||
annotations: true | ||
ignore_results: false |
This file was deleted.
Oops, something went wrong.
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,28 @@ | ||
name: Check File Length | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check file length | ||
run: | | ||
IGNORE=("src/adapters/supabase/types/database.ts" "src/generatedFile2.ts") # Add more files to ignore as needed | ||
find src -name "*.ts" -type f -exec bash -c ' | ||
for ignore in "${IGNORE[@]}"; do | ||
if [[ "$1" == "$ignore" ]]; then | ||
echo "Ignoring $ignore" | ||
exit 0 | ||
fi | ||
done | ||
if [[ $(wc -l < "$1") -gt 512 ]]; then | ||
echo "File $1 line length is greater than 512. This should be broken up into smaller files." | ||
exit 1 | ||
fi | ||
' bash {} \; |
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 |
---|---|---|
|
@@ -14,4 +14,6 @@ supabase/temp | |
# Local Netlify folder | ||
.netlify | ||
bin | ||
.yarn | ||
.yarn | ||
yarn-error.log | ||
tsconfig.tsbuildinfo |
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,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit $1 | ||
bun commitlint --edit "$1" |
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,4 +1,5 @@ | ||
#!/bin/sh | ||
#!/usr/bin/env sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint-staged --verbose | ||
# Run lint-staged first | ||
bun lint-staged --verbose |
Oops, something went wrong.