Integration
CI/CD
Add RF_LICENSE_KEY as a secret in your CI provider, install Chrome, and upload the PDF as an artifact.
GitHub Actions
# .github/workflows/test.yml- name: Install Google Chrome run: | wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | \ sudo gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] \ http://dl.google.com/linux/chrome/deb/ stable main" | \ sudo tee /etc/apt/sources.list.d/google-chrome.list sudo apt-get update -qq && sudo apt-get install -y google-chrome-stable- name: Run Playwright tests env: PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome-stable RF_LICENSE_KEY: ${{ secrets.RF_LICENSE_KEY }} run: npx playwright test- name: Upload PDF report if: always() uses: actions/upload-artifact@v4 with: name: playwright-pdf-report path: reports/*.pdfGitLab CI
# .gitlab-ci.ymlplaywright-tests: image: mcr.microsoft.com/playwright:v1.49.0-jammy variables: PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome-stable RF_LICENSE_KEY: $RF_LICENSE_KEY # set in CI/CD → Variables before_script: - apt-get update -qq && apt-get install -y google-chrome-stable script: - npm ci && npx playwright test artifacts: paths: [reports/*.pdf] when: always expire_in: 30 daysBitbucket Pipelines
# bitbucket-pipelines.ymlimage: mcr.microsoft.com/playwright:v1.49.0-jammypipelines: default: - step: name: Playwright Tests + PDF Report caches: [node] script: - npm ci - npx playwright test artifacts: - playwright-report/*.pdfSet RF_LICENSE_KEY in Repository Settings → Repository variables. The Playwright Docker image includes Chromium. If the reporter cannot auto-detect the browser path, set puppeteerExecutablePath in your reporter config.
Jenkins
// Jenkinsfilestage('Playwright Tests') { environment { PUPPETEER_EXECUTABLE_PATH = '/usr/bin/google-chrome-stable' } steps { sh 'apt-get update -qq && apt-get install -y google-chrome-stable' withCredentials([string(credentialsId: 'rf-license-key', variable: 'RF_LICENSE_KEY')]) { sh 'npm ci && npx playwright test' } archiveArtifacts artifacts: 'reports/*.pdf', allowEmptyArchive: true }}Azure DevOps
# azure-pipelines.yml- script: | wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | \ sudo gpg --dearmor -o /usr/share/keyrings/google-chrome.gpg echo "deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] \ http://dl.google.com/linux/chrome/deb/ stable main" | \ sudo tee /etc/apt/sources.list.d/google-chrome.list sudo apt-get update -qq && sudo apt-get install -y google-chrome-stable displayName: Install Google Chrome- script: npx playwright test displayName: Run tests env: PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome-stable RF_LICENSE_KEY: $(RF_LICENSE_KEY)- task: PublishPipelineArtifact@1 condition: always() inputs: targetPath: reports artifact: playwright-pdf-reportGitHub Actions: Sharded runs
Run shards in parallel, upload each shard's JSON report as an artifact, then merge into one PDF in a final job. See Shard merging for the full workflow.
# .github/workflows/test.ymljobs: test: strategy: matrix: shard: [1, 2, 3, 4] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 - run: npm ci - run: npx playwright test --shard=${{ matrix.shard }}/4 env: PLAYWRIGHT_JSON_OUTPUT_NAME: results/shard-${{ matrix.shard }}.json PLAYWRIGHT_REPORTERS: json - uses: actions/upload-artifact@v4 with: name: shard-${{ matrix.shard }} path: results/shard-*.json merge-report: needs: test runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 - run: npm ci - uses: actions/download-artifact@v4 with: pattern: shard-* merge-multiple: true path: results - run: npx playwright test --reporter=@reportforge/playwright-pdf env: PUPPETEER_EXECUTABLE_PATH: /usr/bin/google-chrome-stable RF_LICENSE_KEY: ${{ secrets.RF_LICENSE_KEY }} SHARD_RESULTS_GLOB: results/shard-*.json - uses: actions/upload-artifact@v4 with: name: playwright-pdf-report path: reports/*.pdf