Add cache to speed up NPM runs

Signed-off-by: Christian Wolf <github@christianwolf.email>
This commit is contained in:
Christian Wolf 2022-01-17 15:44:22 +01:00
Родитель 721af3a621
Коммит 1d6ea83c88
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 9FC3120E932F73F1
2 изменённых файлов: 42 добавлений и 7 удалений

16
.github/workflows/deploy-appstore.yml поставляемый
Просмотреть файл

@ -26,7 +26,21 @@ jobs:
path: cookbook
ref: ${{ github.ref }}
fetch-depth: 0
- name: Get the date
id: date
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
- name: Use cache for NPM
uses: actions/cache@v2.1.7
with:
path: |
~/.npm
cookbook/node_modules
key: ${{ runner.os }}-node-${{ steps.date.outputs.date }}-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.date.outputs.date }}-
${{ runner.os }}-node-
- name: Bump the version
id: bump
run: ./.github/actions/deploy/create-version.sh

33
.github/workflows/tests.yml поставляемый
Просмотреть файл

@ -16,9 +16,20 @@ jobs:
steps:
- name: Checkout the project
uses: actions/checkout@v2
- name: Make sure the appinfo is built
shell: bash
run: make appinfo/info.xml
- name: Get the date
id: date
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
- name: Cache NPM cache
uses: actions/cache@v2.1.7
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ steps.date.outputs.date }}-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.date.outputs.date }}-
${{ runner.os }}-node-
- name: Get PHP version
shell: bash
run: php -v
@ -295,9 +306,19 @@ jobs:
- name: Checkout the app
uses: actions/checkout@v2
- name: Ensure the appinfo is built
shell: bash
run: make appinfo/info.xml
- name: Get the date
id: date
run: echo "::set-output name=date::$(date +%Y-%m-%d)"
- name: Use cache for NPM
uses: actions/cache@v2.1.7
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ steps.date.outputs.date }}-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ steps.date.outputs.date }}-
${{ runner.os }}-node-
- name: Update NPM
shell: bash