Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion .github/workflows/test-compatibility.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,32 @@ 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: [add-compatibility-bridge, 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@v7
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@v4
with:
repository: website-scraper/website-scraper-puppeteer
ref: add-compatibility-bridge
ref: ${{ steps.get_latest_release.outputs.result || matrix.website-scraper-puppeteer-version }}

- name: Set up Node.js
uses: actions/setup-node@v4
Expand Down
Loading