Skip to content

Commit aa8817e

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

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/test-compatibility.yaml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,30 @@ 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+
matrix:
13+
# Run tests on master and latest released version of website-scraper-puppeteer module
14+
website-scraper-puppeteer-version: [add-compatibility-bridge, latest-release]
1115

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

1936
- name: Set up Node.js
2037
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)