Skip to content

Commit

Permalink
fix: 🐛 Update check.yml and added skipValdiation
Browse files Browse the repository at this point in the history
  • Loading branch information
edwinhern committed Jan 27, 2025
1 parent c772952 commit 715e48e
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
OLLAMA_URL=http://localhost:11434/api

GITHUB_API_URL=https://gh-pinned-repos-tsj7ta5xfhep.deno.dev
GITHUB_USERNAME=username
GITHUB_CACHE_DURATION=3600
51 changes: 47 additions & 4 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ name: Check

on: [push]

env:
SKIP_ENV_VALIDATION: true

jobs:
build:
install-dependencies:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

Expand All @@ -20,15 +22,56 @@ jobs:
run_install: |
- recursive: true
- args: [--frozen-lockfile]
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-deps-${{ hashFiles('**/pnpm-lock.yaml') }}

lint:
needs: install-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Restore dependencies
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-deps-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Lint check
run: pnpm lint

format:
needs: install-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Biome
uses: biomejs/setup-biome@v2
with:
version: latest

- name: Lint check
run: pnpm lint
- name: Format check
run: biome ci .

build:
needs: install-dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Restore dependencies
uses: actions/cache@v4
with:
path: |
**/node_modules
key: ${{ runner.os }}-deps-${{ hashFiles('**/pnpm-lock.yaml') }}

- name: Build check
run: pnpm build
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ yarn-error.log*
.pnpm-debug.log*

# env files (can opt-in for committing if needed)
.env*
.env.local

# vercel
.vercel
Expand Down
2 changes: 2 additions & 0 deletions src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@ export const env = createEnv({
GITHUB_CACHE_DURATION: z.coerce.number().min(1),
},
experimental__runtimeEnv: process.env,
skipValidation: !!process.env.SKIP_ENV_VALIDATION,
emptyStringAsUndefined: true,
});

0 comments on commit 715e48e

Please sign in to comment.