From f222392fc901dfe5f6090fd967da04dc77992816 Mon Sep 17 00:00:00 2001 From: hwelsters Date: Thu, 25 Jan 2024 00:52:16 -0700 Subject: [PATCH] ci: cached dependencies to speed up GitHub workflows. --- .github/workflows/lint.yml | 24 +++++++++++++++---- apps/snakecode-webapp/tsconfig.json | 36 +++++++++++++++++++++++------ 2 files changed, 49 insertions(+), 11 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5d12c71..eb77f33 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -2,14 +2,30 @@ name: Lint files on: push: - branches: [main] + # branches: [main] pull_request: - branches: [main] + # branches: [main] jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: lint files - run: yarn install && yarn lint \ No newline at end of file + + - name: Cache node modules + id: cache-node-modules + uses: actions/cache@v3 + with: + path: node_modules + key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-node- + ${{ runner.os }}- + + - + if: steps.cache-node-modules.outputs.cache-hit != 'true' + name: Install dependencies + run: yarn install + + - name: Lint files + run: yarn lint \ No newline at end of file diff --git a/apps/snakecode-webapp/tsconfig.json b/apps/snakecode-webapp/tsconfig.json index 4cdf37b..6cc77a7 100644 --- a/apps/snakecode-webapp/tsconfig.json +++ b/apps/snakecode-webapp/tsconfig.json @@ -1,7 +1,11 @@ { "compilerOptions": { "target": "es5", - "lib": ["dom", "dom.iterable", "esnext"], + "lib": [ + "dom", + "dom.iterable", + "esnext" + ], "allowJs": true, "skipLibCheck": true, "strict": true, @@ -14,11 +18,29 @@ "jsx": "preserve", "incremental": true, "paths": { - "@/*": ["./src/*"], - "@public/*": ["./public/*"], - "@root/*": ["./*"] - } + "@/*": [ + "./src/*" + ], + "@public/*": [ + "./public/*" + ], + "@root/*": [ + "./*" + ] + }, + "plugins": [ + { + "name": "next" + } + ] }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], - "exclude": ["node_modules"] + "include": [ + "next-env.d.ts", + "**/*.ts", + "**/*.tsx", + ".next/types/**/*.ts" + ], + "exclude": [ + "node_modules" + ] }