@sentinelqa/uploader
v0.1.16
Published
Sentinel uploader CLI for CI/CD debugging artifacts
Downloads
1,525
Maintainers
Readme
@sentinelqa/uploader
Sentinel uploader CLI for Playwright CI artifacts.
Install
npm i -D @sentinelqa/uploaderOr run directly:
npx @sentinelqa/uploader playwrightUsage
sentinelqa playwrightIf you want to run without installing, use:
npx @sentinelqa/uploader playwrightMinimal GitLab CI (preserves test exit code)
e2e:
image: node:20
script:
- npm ci
- npx playwright install --with-deps
- |
set +e
npx playwright test --reporter=line,json --output=test-results
TEST_EXIT=$?
export SENTINEL_TEST_EXIT_CODE=$TEST_EXIT
npx @sentinelqa/uploader playwright
exit $TEST_EXIT
artifacts:
when: always
paths:
- playwright-report/
- test-results/Minimal GitHub Actions (preserves test exit code)
name: E2E
on: [push]
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm ci
- run: npx playwright install --with-deps
- run: |
set +e
npx playwright test --reporter=line,json --output=test-results
TEST_EXIT=$?
echo "SENTINEL_TEST_EXIT_CODE=$TEST_EXIT" >> $GITHUB_ENV
npx @sentinelqa/uploader playwright
exit $TEST_EXITRequired Environment Variables
SENTINEL_TOKEN(project ingest token)SENTINEL_URL(optional; defaults tohttps://app.sentinelqa.com)SENTINEL_TEST_EXIT_CODE(optional; used to preserve CI test exit code when running in the same job)
Optional: BYO S3 (Advanced)
Set these to upload directly to your own bucket:
SENTINEL_S3_ENDPOINT(optional for AWS)SENTINEL_S3_REGIONSENTINEL_S3_BUCKETSENTINEL_S3_PREFIX(optional)SENTINEL_S3_ACCESS_KEY_IDSENTINEL_S3_SECRET_ACCESS_KEY
Troubleshooting
Missing artifacts
- Ensure Playwright outputs are present:
playwright-report/report.jsonplaywright-report/test-results/
401 Unauthorized
- Check
SENTINEL_TOKENand project permissions.
No CI metadata
- The uploader detects GitLab or GitHub. If running locally, set the CI env vars or run in CI.
No failed tests
- Ensure
@playwright/testis installed and the JSON reporter is enabled.
BYO uploads failing
- Verify
SENTINEL_S3_*values and permissions.
