feat(test.yml): add KMS key ID to artifact upload and download steps for enhanced security
refactor(test.yml): replace PowerShell scripts with bash for file existence checks for better cross-platform compatibility
if(!((Get-Content $file1) -ceq "Lorem ipsum dolor sit amet") -or !((Get-Content $file2) -ceq "Hello world from file#2"))
{
Write-Error "File contents of downloaded artifacts are incorrect"
}
shell:pwsh
if test -f "$file" && test -f "$file2"; then
echo "$file exists."
else
echo "$file does not exist."
exit 1
fi
shell:bash
# Download Artifact #3 and verify the correctness of the content
- name:'Download artifact #3'
@ -138,15 +145,13 @@ jobs:
- name:'Verify Artifact #3'
run:|
$gzipFile = "gzip/artifact/path/gzip.txt"
if(!(Test-Path -path $gzipFile))
{
Write-Error "Expected file do not exist"
}
if(!((Get-Content $gzipFile) -ceq "This is a going to be a test for a large enough file that should get compressed with GZip. The @actions/artifact package uses GZip to upload files. This text should have a compression ratio greater than 100% so it should get uploaded using GZip"))
{
Write-Error "File contents of downloaded artifact is incorrect"