1
0
Fork 0

Update artifact-tests.yml

Back to Node 16, and bring back the custom fix for windows
pull/1258/head
John Sudol 2022-12-12 11:19:25 -05:00 committed by GitHub
parent 31d5189ce1
commit 942b3c6ec4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 6 deletions

View File

@ -24,10 +24,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
- name: Set Node.js 18.x
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 16.x
# In order to upload & download artifacts from a shell script, certain env variables need to be set that are only available in the
# node context. This runs a local action that gets and sets the necessary env variables that are needed
@ -58,13 +58,20 @@ jobs:
echo ${{ env.non-gzip-artifact-content }} > artifact-path/world.txt
echo ${{ env.gzip-artifact-content }} > artifact-path/gzip.txt
touch artifact-path/empty.txt
- name: Add additional logging
shell: bash
run: |
cat ./artifact-1-directory/artifact-path/world.txt
cat ./artifact-2-directory/artifact-path/gzip.txt
cat ./artifact-3-directory/artifact-path/empty.txt
# We're using node -e to call the functions directly available in the @actions/artifact package
- name: Upload artifacts using uploadArtifact()
run: |
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-1',['artifact-path/world.txt'], '${{ github.workspace }}'))"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-2',['artifact-path/gzip.txt'], '${{ github.workspace }}'))"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-3',['artifact-path/empty.txt'], '${{ github.workspace }}'))"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-1',['artifact-path/world.txt'], process.argv[1]))" "${{ github.workspace }}"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-2',['artifact-path/gzip.txt'], process.argv[1]))" "${{ github.workspace }}"
node -e "Promise.resolve(require('./packages/artifact/lib/artifact-client').create().uploadArtifact('my-artifact-3',['artifact-path/empty.txt'], process.argv[1]))" "${{ github.workspace }}"
- name: Download artifacts using downloadArtifact()
run: |
@ -82,7 +89,6 @@ jobs:
cat ./artifact-2-directory/artifact-path/gzip.txt
cat ./artifact-3-directory/artifact-path/empty.txt
- name: Verify downloadArtifact()
shell: bash
run: |