Skip to content

Commit f917aa7

Browse files
committed
Run tests on the latest master(currently add-compatibility-bridge branch) and latest-release
1 parent d36702d commit f917aa7

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

.github/workflows/test-compatibility.yaml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,31 @@ jobs:
88
test-compatibility:
99
if: github.event_name == 'workflow_dispatch' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
1010
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
# Run tests on master and latest released version of website-scraper-puppeteer module
15+
website-scraper-puppeteer-version: [add-compatibility-bridge, latest-release]
1116

1217
steps:
18+
-
19+
name: Get latest release tag of website-scraper/website-scraper-puppeteer
20+
if: matrix.website-scraper-puppeteer-version == 'latest-release'
21+
id: get_latest_release
22+
uses: actions/github-script@v7
23+
with:
24+
script: |
25+
const latestRelease = await github.rest.repos.getLatestRelease({
26+
owner: 'website-scraper',
27+
repo: 'website-scraper-puppeteer'
28+
});
29+
return latestRelease.data.tag_name;
30+
1331
- name: Checkout website-scraper-puppeteer
1432
uses: actions/checkout@v4
1533
with:
1634
repository: website-scraper/website-scraper-puppeteer
17-
ref: add-compatibility-bridge
35+
ref: ${{ steps.get_latest_release.outputs.result || matrix.website-scraper-puppeteer-version }}
1836

1937
- name: Set up Node.js
2038
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)