diff --git a/.github/workflows/artifact-tests.yml b/.github/workflows/artifact-tests.yml index c8ecada8..b907cbe4 100644 --- a/.github/workflows/artifact-tests.yml +++ b/.github/workflows/artifact-tests.yml @@ -130,10 +130,84 @@ jobs: console.log(`Successfully uploaded single file artifact ${id}`) + upload-html-file: + name: Upload HTML File (no zip) + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v5 + + - name: Set Node.js 24.x + uses: actions/setup-node@v5 + with: + node-version: 24.x + + - name: Install root npm packages + run: npm ci + + - name: Compile artifact package + run: | + npm ci + npm run tsc + working-directory: packages/artifact + + - name: Create HTML file + 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 methodskipArchive: true
Content-Typetext/html
Filereport.html
+

✔ Single file upload is working!

+ + + EOF + + - name: Upload HTML Artifact (skipArchive) + uses: actions/github-script@v8 + with: + script: | + const {default: artifact} = require('./packages/artifact/lib/artifact') + + const uploadResult = await artifact.uploadArtifact( + 'test-report', + ['report.html'], + './', + {skipArchive: true} + ) + console.log(uploadResult) + console.log(`Successfully uploaded HTML artifact ${uploadResult.id}`) + console.log('This artifact is intentionally kept for manual browser verification') + verify: name: Verify and Delete runs-on: ubuntu-latest - needs: [upload, upload-single-file] + needs: [upload, upload-single-file, upload-html-file] steps: - name: Checkout uses: actions/checkout@v5