Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 35 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ jobs:
command: |
sudo npm install -g pnpm
pnpm install --frozen-lockfile
- run:
name: Install functions dependencies
command: |
cd functions
npm install --legacy-peer-deps
- run:
name: Run linting
command: |
Expand All @@ -42,14 +47,42 @@ jobs:
name: TypeScript type check
command: |
cd functions
npx tsc --noEmit
./node_modules/.bin/tsc --noEmit
- run:
name: Quality GC check
command: npx quality-gc run || echo "Quality GC issues found"
command: pnpm run quality-gc run || echo "Quality GC issues found"

deploy-worker:
docker:
- image: cimg/node:20.18
steps:
- checkout
- run:
name: Install dependencies
command: |
sudo npm install -g pnpm
pnpm install --frozen-lockfile
- run:
name: TypeScript type check for worker
command: pnpm run type-check
- run:
name: Deploy YouTube API Worker to Cloudflare
command: |
pnpm run deploy:worker
environment:
CLOUDFLARE_API_TOKEN: $CLOUDFLARE_API_TOKEN
CLOUDFLARE_ACCOUNT_ID: $CLOUDFLARE_ACCOUNT_ID

workflows:
version: 2
validate:
jobs:
- python-checks
- node-checks

deploy:
jobs:
- deploy-worker:
filters:
branches:
only: main
34 changes: 33 additions & 1 deletion functions/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
module.exports={root:!0,env:{es6:!0,node:!0},extends:["eslint:recommended","plugin:import/errors","plugin:import/warnings","plugin:import/typescript","google","plugin:@typescript-eslint/recommended"],parser:"@typescript-eslint/parser",parserOptions:{project:["tsconfig.json","tsconfig.dev.json"],sourceType:"module"},ignorePatterns:["/lib/**/*","/generated/**/*"],plugins:["@typescript-eslint","import"],rules:{quotes:["error","double"],"import/no-unresolved":0,indent:["error",2]}};
module.exports = {
root: true,
env: {
es6: true,
node: true,
},
extends: [
"eslint:recommended",
"plugin:import/errors",
"plugin:import/warnings",
"plugin:import/typescript",
"google",
"plugin:@typescript-eslint/recommended",
],
parser: "@typescript-eslint/parser",
parserOptions: {
project: ["tsconfig.json", "tsconfig.dev.json"],
sourceType: "module",
},
ignorePatterns: [
"/lib/**/*",
"/generated/**/*",
],
plugins: [
"@typescript-eslint",
"import",
],
rules: {
"quotes": ["error", "double"],
"import/no-unresolved": 0,
"indent": ["error", 2],
},
};
Loading
Loading