Skip to content

Commit aa6d6d4

Browse files
authored
Run tests on the latest master(currently add-compatibility-bridge branch) and latest-release (#18)
1 parent d36702d commit aa6d6d4

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/test-compatibility.yaml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,32 @@ 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+
result-encoding: string
25+
script: |
26+
const latestRelease = await github.rest.repos.getLatestRelease({
27+
owner: 'website-scraper',
28+
repo: 'website-scraper-puppeteer'
29+
});
30+
return latestRelease.data.tag_name;
31+
1332
- name: Checkout website-scraper-puppeteer
1433
uses: actions/checkout@v4
1534
with:
1635
repository: website-scraper/website-scraper-puppeteer
17-
ref: add-compatibility-bridge
36+
ref: ${{ steps.get_latest_release.outputs.result || matrix.website-scraper-puppeteer-version }}
1837

1938
- name: Set up Node.js
2039
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)