mirror of
https://code.forgejo.org/actions/cache.git
synced 2025-05-05 01:39:53 +02:00
Use @actions/glob for pattern matching
This commit is contained in:
parent
1e233443e8
commit
db235cfc56
12 changed files with 4427 additions and 176 deletions
34
.github/workflows/cache.yml
vendored
Normal file
34
.github/workflows/cache.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
|||
name: Cache
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
# Build and unit test
|
||||
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'
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
- name: Restore npm cache
|
||||
uses: ./
|
||||
with:
|
||||
path: |
|
||||
node_modules
|
||||
dist
|
||||
~/Desktop/cache-me
|
||||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
||||
- name: Prettier Format Check
|
||||
run: npm run format-check
|
||||
- name: ESLint Check
|
||||
run: npm run lint
|
||||
- name: Build & Test
|
||||
run: npm run test
|
Loading…
Add table
Add a link
Reference in a new issue