mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-10 14:11:29 +08:00
Setup CI cache for Elixir and Node dependencies
This commit is contained in:
parent
93403ff1b5
commit
10973de66b
2 changed files with 32 additions and 0 deletions
16
.github/workflows/assets.yaml
vendored
16
.github/workflows/assets.yaml
vendored
|
|
@ -13,6 +13,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
otp-version: '24.0'
|
otp-version: '24.0'
|
||||||
elixir-version: '1.12.0'
|
elixir-version: '1.12.0'
|
||||||
|
- name: Cache Mix
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
deps
|
||||||
|
_build
|
||||||
|
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-mix-
|
||||||
# Note: we need to get Phoenix and LV because package.json points to them directly
|
# Note: we need to get Phoenix and LV because package.json points to them directly
|
||||||
- name: Install mix dependencies
|
- name: Install mix dependencies
|
||||||
run: mix deps.get
|
run: mix deps.get
|
||||||
|
|
@ -20,6 +29,13 @@ jobs:
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14.x'
|
node-version: '14.x'
|
||||||
|
- name: Cache npm dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
- name: Install npm dependencies
|
- name: Install npm dependencies
|
||||||
run: npm ci --prefix assets
|
run: npm ci --prefix assets
|
||||||
- name: Build assets
|
- name: Build assets
|
||||||
|
|
|
||||||
16
.github/workflows/test.yaml
vendored
16
.github/workflows/test.yaml
vendored
|
|
@ -14,6 +14,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
otp-version: '24.0'
|
otp-version: '24.0'
|
||||||
elixir-version: '1.12.0'
|
elixir-version: '1.12.0'
|
||||||
|
- name: Cache Mix
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
deps
|
||||||
|
_build
|
||||||
|
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-mix-
|
||||||
- name: Install mix dependencies
|
- name: Install mix dependencies
|
||||||
run: mix deps.get
|
run: mix deps.get
|
||||||
- name: Check formatting
|
- name: Check formatting
|
||||||
|
|
@ -26,6 +35,13 @@ jobs:
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
node-version: '14.x'
|
node-version: '14.x'
|
||||||
|
- name: Cache npm dependencies
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ~/.npm
|
||||||
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-node-
|
||||||
- name: Install npm dependencies
|
- name: Install npm dependencies
|
||||||
run: npm ci --prefix assets
|
run: npm ci --prefix assets
|
||||||
- name: Check assets formatting
|
- name: Check assets formatting
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue