Skip to content

Commit

Permalink
Tries to cache dependencies in the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon committed Oct 19, 2023
1 parent d6c654b commit 5a8a4df
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
10 changes: 10 additions & 0 deletions .github/actions/setup-node/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
name: 'Setups node caching dependencies'

runs:
using: 'composite'
steps:
- name: Restore cache
uses: actions/setup-node@v3
with:
node-version: lts/Hydrogen
cache: 'npm'
10 changes: 10 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ jobs:
- name: Setup antlr4
uses: ./.github/actions/setup-antlr4

- name: Setup node
uses: ./.github/actions/setup-node

- name: Install dependencies with frozen lock file and generate parser
run: npm ci

Expand All @@ -42,6 +45,9 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Setup node
uses: ./.github/actions/setup-node

- name: Setup antlr4
uses: ./.github/actions/setup-antlr4

Expand All @@ -63,6 +69,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: lts/Hydrogen
cache: 'npm'

- name: Setup antlr4
uses: ./.github/actions/setup-antlr4
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Setup node
uses: ./.github/actions/setup-node

- name: Setup Pages
uses: actions/configure-pages@v3

Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/publish-cypher-codemirror.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Setup node
uses: ./.github/actions/setup-node

- name: Setup antlr4
uses: ./.github/actions/setup-antlr4
Expand Down

0 comments on commit 5a8a4df

Please sign in to comment.