Skip to content

Commit

Permalink
💚 テストのスクリプトをちょっと改良
Browse files Browse the repository at this point in the history
  • Loading branch information
wappon28dev committed Sep 22, 2024
1 parent b048a08 commit 88f4868
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "0.2",
"ignorePaths": [
"node_modules",
"src/types/supabase.gen.ts",
"/package.json"
],
"words": [
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,24 @@ jobs:
- name: 🔨 Prepare Node environment
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 22
- name: 🔨 Prepare Bun environment
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- run: curl -sfS https://dotenvx.sh/install.sh | sh

- name: 🎉 Install project dependencies
run: bun i

- name: 🏗️ Build app
run: bun run build
- name: 🔏 Decrypt .envs
run: bun dotenvx decrypt -f .env -f .env.production
env:
DOTENV_PRIVATE_KEY: ${{ secrets.DOTENV_PRIVATE_KEY }}
DOTENV_PRIVATE_KEY_PRODUCTION: ${{ secrets.DOTENV_PRIVATE_KEY_PRODUCTION }}

- name: 🏗️ Build app
run: bun run build

- name: 🚀 Deploy to Cloudflare Pages
id: cloudflare_pages_deploy
uses: cloudflare/[email protected]
Expand Down
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
src/assets/animations/*
functions/tsconfig.json
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"prepare": "panda codegen",
"dev": "dotenvx run -- bun vite",
"dev:workers": "dotenvx run -- wrangler pages dev --ip 127.0.0.1 --port 5173 -- bun run dev",
"build": "dotenvx run -f .env -f .env.production --overload -- bun tsr generate && bun tsc -b && vite build && bunx cpx wrangler.toml dist/ && bunx cpx \"functions/**\" dist/functions",
"build": "dotenvx run -f .env -f .env.production --overload -- bun run test && vite build && bunx cpx wrangler.toml dist/ && bunx cpx \"functions/**\" dist/functions",
"preview": "vite preview",
"test": "tsc && bun typo && prettier --check ./src/ ./functions/ --check && eslint --ext .ts,.tsx ./src ./functions/ ",
"test": "bun tsr generate && bun tsc -b && bun typo && prettier --check ./src/ ./functions/ --check && eslint --ext .ts,.tsx ./src ./functions/ ",
"fmt": "prettier --write ./src/",
"lint": "eslint --ext .ts,.tsx ./src",
"typo": "cspell \"./src/**\" \"./functions/**\" --gitignore",
Expand Down
2 changes: 1 addition & 1 deletion src/components/sva/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const svaDialog = sva({
},
backdrop: {
animation: "fadeIn 0.3s",
backgroundColor: "rgba(0, 0, 0, 0.5)",
backgroundColor: "wkb-neutral.0/20",
position: "fixed",
top: 0,
left: 0,
Expand Down
4 changes: 2 additions & 2 deletions src/lib/classes/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import { notifyErrorInToast, toaster } from "@/lib/utils/toast";
import { type UserMetadata } from "@/types/auth";

export class User {
constructor(public session: Session) {}

public metadata = this.session.user.user_metadata as UserMetadata;
public id = this.session.user.id;

constructor(public session: Session) {}

static async signIn(): Promise<void> {
match(
await supabase.auth.signInWithOAuth({
Expand Down
1 change: 1 addition & 0 deletions src/routes/demo/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export const Route = createFileRoute("/demo/")({
useEffect(() => {
void fetchAddressFromLocation({ lat: 35.681236, lon: 139.767125 }).then(
(res) => {
// eslint-disable-next-line no-console
console.log(res);
},
);
Expand Down

0 comments on commit 88f4868

Please sign in to comment.