diff --git a/.github/workflows/test-compatibility.yaml b/.github/workflows/test-compatibility.yaml index a2e2dc4..85691d4 100644 --- a/.github/workflows/test-compatibility.yaml +++ b/.github/workflows/test-compatibility.yaml @@ -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