Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct download url for beta driver #422

Merged
merged 4 commits into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
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
10 changes: 4 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ jobs:
- name: Test
env:
BROWSER: ${{ matrix.browser }}
GOEXPERIMENT: nocoverageredesign
if: matrix.os == 'ubuntu-latest'
run: xvfb-run go test -v -covermode atomic -coverprofile=covprofile -coverpkg="github.com/playwright-community/playwright-go" --race ./...
- name: Test
env:
BROWSER: ${{ matrix.browser }}
GOEXPERIMENT: nocoverageredesign
if: matrix.os != 'ubuntu-latest'
run: go test -v -covermode atomic -coverprofile=covprofile -coverpkg="github.com/playwright-community/playwright-go" --race ./...
- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
run: go install github.com/mattn/goveralls@latest
- name: Send coverage
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -86,9 +86,7 @@ jobs:
go-version: ^1.19.9
id: go
- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
run: go install github.com/mattn/goveralls@latest
- name: Finish
run: goveralls -service=github -parallel-finish
env:
Expand Down
6 changes: 3 additions & 3 deletions run.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import (
)

const (
playwrightCliVersion = "1.41.1"
playwrightCliVersion = "1.41.2"
)

var playwrightCDNMirrors = []string{
Expand Down Expand Up @@ -298,7 +298,7 @@ func (d *PlaywrightDriver) getDriverURLs() []string {
baseURLs := []string{}
pattern := "%s/builds/driver/playwright-%s-%s.zip"
if !d.isReleaseVersion() {
pattern = "%s/next/builds/driver/playwright-%s-%s.zip"
pattern = "%s/builds/driver/next/playwright-%s-%s.zip"
}

if hostEnv := os.Getenv("PLAYWRIGHT_DOWNLOAD_HOST"); hostEnv != "" {
Expand All @@ -314,7 +314,7 @@ func (d *PlaywrightDriver) getDriverURLs() []string {
// isReleaseVersion checks if the version is not a beta or alpha release
// this helps to determine the url from where to download the driver
func (d *PlaywrightDriver) isReleaseVersion() bool {
return !strings.Contains(d.Version, "beta") && !strings.Contains(d.Version, "alpha")
return !strings.Contains(d.Version, "beta") && !strings.Contains(d.Version, "alpha") && !strings.Contains(d.Version, "next")
}

func makeFileExecutable(path string) error {
Expand Down
Loading