mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-28 01:18:27 +02:00
ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows
This commit is contained in:
parent
3be87be14a
commit
62a50d2239
1 changed files with 78 additions and 80 deletions
18
.github/workflows/test.yml
vendored
18
.github/workflows/test.yml
vendored
|
@ -2,13 +2,12 @@ name: Test
|
|||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- "**.md"
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
- "**.md"
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
name: Build
|
||||
|
||||
|
@ -24,9 +23,10 @@ jobs:
|
|||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set Node.js 12.x
|
||||
uses: actions/setup-node@v1
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 12.x
|
||||
cache: npm
|
||||
|
||||
- name: npm install
|
||||
run: npm install
|
||||
|
@ -52,27 +52,27 @@ jobs:
|
|||
- name: Upload artifact A
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: 'Artifact-A'
|
||||
name: "Artifact-A"
|
||||
path: path/to/artifact-A
|
||||
|
||||
- name: Upload artifact B
|
||||
uses: actions/upload-artifact@v1
|
||||
with:
|
||||
name: 'Artifact-B'
|
||||
name: "Artifact-B"
|
||||
path: path/to/artifact-B
|
||||
|
||||
# Test downloading a single artifact
|
||||
- name: Download artifact A
|
||||
uses: ./
|
||||
with:
|
||||
name: 'Artifact-A'
|
||||
name: "Artifact-A"
|
||||
path: some/new/path
|
||||
|
||||
# Test downloading an artifact using tilde expansion
|
||||
- name: Download artifact A
|
||||
uses: ./
|
||||
with:
|
||||
name: 'Artifact-A'
|
||||
name: "Artifact-A"
|
||||
path: ~/some/path/with/a/tilde
|
||||
|
||||
- name: Verify successful download
|
||||
|
@ -108,5 +108,3 @@ jobs:
|
|||
Write-Error "File contents of downloaded artifacts are incorrect"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue