From ffeab76ee20a70e2c3525e8591d4fecbe4cf2920 Mon Sep 17 00:00:00 2001 From: Daniel Kennedy Date: Wed, 25 Feb 2026 14:18:40 -0500 Subject: [PATCH] Add CI tests for direct uploads --- .github/workflows/test.yml | 95 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 95 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b8171bd..8e3fad6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -213,6 +213,101 @@ jobs: Write-Error "File contents of downloaded artifact are incorrect" } shell: pwsh + + # Upload a single file without archiving (direct file upload) + - name: 'Create direct upload file' + run: echo -n 'direct file upload content' > direct-upload-${{ matrix.runs-on }}.txt + shell: bash + + - name: 'Upload direct file artifact' + uses: ./ + with: + name: 'Direct-File-${{ matrix.runs-on }}' + path: direct-upload-${{ matrix.runs-on }}.txt + archive: false + + - name: 'Download direct file artifact' + uses: actions/download-artifact@v4 + with: + name: direct-upload-${{ matrix.runs-on }}.txt + path: direct-download + + - name: 'Verify direct file artifact' + run: | + $file = "direct-download/direct-upload-${{ matrix.runs-on }}.txt" + if(!(Test-Path -path $file)) + { + Write-Error "Expected file does not exist" + } + if(!((Get-Content $file -Raw).TrimEnd() -ceq "direct file upload content")) + { + Write-Error "File contents of downloaded artifact are incorrect" + } + shell: pwsh + + upload-html-report: + name: Upload HTML Report + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node 24 + uses: actions/setup-node@v4 + with: + node-version: 24.x + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Compile + run: npm run build + + - name: Create HTML report + run: | + cat > report.html << 'EOF' + + + + + + Artifact Upload Test Report + + + +

Artifact Upload Test Report

+
+ This HTML file was uploaded as a single un-zipped artifact. + If you can see this in the browser, the feature is working correctly! +
+ + + + + +
PropertyValue
Upload methodarchive: false
Content-Typetext/html
Filereport.html
+

✔ Single file upload is working!

+ + + EOF + + - name: Upload HTML report (no archive) + uses: ./ + with: + name: 'test-report' + path: report.html + archive: false + merge: name: Merge needs: build