Skip to content

Commit

Permalink
ci: cached dependencies to speed up GitHub workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
hwelsters committed Jan 25, 2024
1 parent acf749c commit 8b844d4
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 11 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,37 @@ 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

- name: Cache node modules
id: cache-yarn
uses: actions/cache@v3
env:
cache-name: cache-node-modules
with:
# npm cache files are stored in `~/.npm` on Linux/macOS
path: ~/.cache/yarn
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }}
name: List the state of node modules
continue-on-error: true
run: yarn list

- name: Install dependencies
run: yarn install

- name: Lint files
run: yarn lint
36 changes: 29 additions & 7 deletions apps/snakecode-webapp/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
Expand All @@ -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"
]
}

0 comments on commit 8b844d4

Please sign in to comment.