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' + + +
+ + +| Property | Value |
|---|---|
| Upload method | archive: false |
| Content-Type | text/html |
| File | report.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