mirror of
https://code.forgejo.org/actions/download-artifact
synced 2025-07-13 13:43:52 +02:00
Misc Updates
This commit is contained in:
parent
32e9693460
commit
4dce5b5a43
3 changed files with 469 additions and 164 deletions
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
|
@ -44,23 +44,20 @@ jobs:
|
||||||
- name: Format
|
- name: Format
|
||||||
run: npm run format-check
|
run: npm run format-check
|
||||||
|
|
||||||
# Test end-to-end by uploading two artifacts and then attempting to download them
|
# Test end-to-end by uploading two artifacts and then downloading them
|
||||||
- name: Create artifact A
|
- name: Create artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir -p path/to/artifact-A
|
mkdir -p path/to/artifact-A
|
||||||
echo hello? > path/to/artifact-A/world-A.txt
|
mkdir -p path/to/artifact-B
|
||||||
|
echo "Lorem ipsum dolor sit amet" > path/to/artifact-A/file-A.txt
|
||||||
|
echo "Hello world from file B" > path/to/artifact-B/file-B.txt
|
||||||
|
|
||||||
- name: Upload artifact A
|
- name: Upload artifact A
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
name: 'Artifact-A'
|
name: 'Artifact-A'
|
||||||
path: path/to/artifact-A
|
path: path/to/artifact-A
|
||||||
|
|
||||||
- name: Create artifact B
|
|
||||||
run: |
|
|
||||||
mkdir -p path/to/artifact-B
|
|
||||||
echo Hello!! > path/to/artifact-B/world-B.txt
|
|
||||||
|
|
||||||
- name: Upload artifact B
|
- name: Upload artifact B
|
||||||
uses: actions/upload-artifact@v1
|
uses: actions/upload-artifact@v1
|
||||||
with:
|
with:
|
||||||
|
@ -76,12 +73,12 @@ jobs:
|
||||||
|
|
||||||
- name: Verify successful download
|
- name: Verify successful download
|
||||||
run: |
|
run: |
|
||||||
$file = "some/new/path/world-A.txt"
|
$file = "some/new/path/file-A.txt"
|
||||||
if(!(Test-Path -path $file))
|
if(!(Test-Path -path $file))
|
||||||
{
|
{
|
||||||
Write-Error "Expected file does not exist"
|
Write-Error "Expected file does not exist"
|
||||||
}
|
}
|
||||||
if(!((Get-Content $file) -ceq "hello?"))
|
if(!((Get-Content $file) -ceq "Lorem ipsum dolor sit amet"))
|
||||||
{
|
{
|
||||||
Write-Error "File contents of downloaded artifact are incorrect"
|
Write-Error "File contents of downloaded artifact are incorrect"
|
||||||
}
|
}
|
||||||
|
@ -95,13 +92,13 @@ jobs:
|
||||||
|
|
||||||
- name: Verify successful download
|
- name: Verify successful download
|
||||||
run: |
|
run: |
|
||||||
$fileA = "some/other/path/Artifact-A/world-A.txt"
|
$fileA = "some/other/path/Artifact-A/file-A.txt"
|
||||||
$fileB = "some/other/path/Artifact-B/world-B.txt"
|
$fileB = "some/other/path/Artifact-B/file-B.txt"
|
||||||
if(!(Test-Path -path $fileA) -or !(Test-Path -path $fileB))
|
if(!(Test-Path -path $fileA) -or !(Test-Path -path $fileB))
|
||||||
{
|
{
|
||||||
Write-Error "Expected files do not exist"
|
Write-Error "Expected files do not exist"
|
||||||
}
|
}
|
||||||
if(!((Get-Content $fileA) -ceq "hello?") -or !((Get-Content $fileB) -ceq "Hello!!"))
|
if(!((Get-Content $fileA) -ceq "Lorem ipsum dolor sit amet") -or !((Get-Content $fileB) -ceq "Hello world from file B"))
|
||||||
{
|
{
|
||||||
Write-Error "File contents of downloaded artifacts are incorrect"
|
Write-Error "File contents of downloaded artifacts are incorrect"
|
||||||
}
|
}
|
||||||
|
|
606
package-lock.json
generated
606
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -27,7 +27,7 @@
|
||||||
"url": "https://github.com/actions/download-artifact/issues"
|
"url": "https://github.com/actions/download-artifact/issues"
|
||||||
},
|
},
|
||||||
"homepage": "https://github.com/actions/download-artifact#readme",
|
"homepage": "https://github.com/actions/download-artifact#readme",
|
||||||
"dependencies": {
|
"devDependencies": {
|
||||||
"@actions/artifact": "^0.1.0",
|
"@actions/artifact": "^0.1.0",
|
||||||
"@actions/core": "^1.2.2",
|
"@actions/core": "^1.2.2",
|
||||||
"@typescript-eslint/parser": "^2.20.0",
|
"@typescript-eslint/parser": "^2.20.0",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue