mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-05-05 09:39:54 +02:00
unit test coverage for caching multiple dirs
This commit is contained in:
parent
e0d1942524
commit
057d9de723
11 changed files with 161 additions and 80 deletions
29
.github/workflows/cache.yml
vendored
29
.github/workflows/cache.yml
vendored
|
@ -1,29 +0,0 @@
|
|||
name: Cache
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- name: Restore npm cache
|
||||
uses: ./
|
||||
id: cache
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
dist
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('salt.txt') }}
|
||||
- run: npm install
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
||||
- run: npm run build
|
||||
if: steps.cache.outputs.cache-hit != 'true'
|
10
.github/workflows/workflow.yml
vendored
10
.github/workflows/workflow.yml
vendored
|
@ -1,11 +1,11 @@
|
|||
name: Tests
|
||||
|
||||
on:
|
||||
# pull_request:
|
||||
# branches:
|
||||
# - master
|
||||
# paths-ignore:
|
||||
# - '**.md'
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue