Skip to content

Verifying provenance attestations #55

Verifying provenance attestations

Verifying provenance attestations #55

name: Test compatibility with puppeteer
on:
pull_request: ~
workflow_dispatch: ~
jobs:
test-compatibility:
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Run tests on master and latest released version of website-scraper-puppeteer module
website-scraper-puppeteer-version: [master, latest-release]
steps:
-
name: Get latest release tag of website-scraper/website-scraper-puppeteer
if: matrix.website-scraper-puppeteer-version == 'latest-release'
id: get_latest_release
uses: actions/github-script@v8
with:
result-encoding: string
script: |
const latestRelease = await github.rest.repos.getLatestRelease({
owner: 'website-scraper',
repo: 'website-scraper-puppeteer'
});
return latestRelease.data.tag_name;
- name: Checkout website-scraper-puppeteer
uses: actions/checkout@v5
with:
repository: website-scraper/website-scraper-puppeteer
ref: ${{ steps.get_latest_release.outputs.result || matrix.website-scraper-puppeteer-version }}
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: '22'
- name: Update npm
run: npm install -g npm@latest
- name: Install dependencies
run: npm install
- name: Verifying provenance attestations
run: npm audit signatures
- name: Install version wrapper package from the branch
run: npm install website-scraper/puppeteer-version-wrapper#${{ github.head_ref }} --save
- name: Disable AppArmor
run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns
- name: Run tests
run: npm test