diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index c976050a..00000000 --- a/.gitattributes +++ /dev/null @@ -1,3 +0,0 @@ -# text files must be lf for golden file tests to work -* text=auto eol=lf - diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 39d5c903..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: mxschmitt diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 5d749ee4..00000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -name: "Bug report \U0001FAB2" -about: Create a bug report to help us improve -title: "[Bug]: " -labels: p2-bug -assignees: '' - ---- - - -**Environments** - -- playwright-go Version: [e.g. v0.4201.1] -- Browser: [e.g. firefox] -- OS and version: [e.g. macOS / Windows 11/ Ubuntu 22.04] - -**Bug description** - - -**To Reproduce** -Please provide a mini reproduction rather than just a description. For example: - -```go -package main - -import "github.com/playwright-community/playwright-go" - -func main() { - // ignore unnecessary error handling code - pw, _ := playwright.Run() - browser, _ := pw.Chromium.Launch() - context, _ := browser.NewContext() - page, _ := context.NewPage() - - _, _ = page.Goto("https://playwright.dev") - - _, err := page.PDF(playwright.PagePdfOptions{ - Path: playwright.String("playwright-example.pdf"), - }) - // should no error - if err != nil { - panic(err) - } -} - -``` - -**Additional context** -Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 18a275e2..00000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: "Feature request \U0001F680" -about: Suggest an idea for this project -title: "[Feature]: " -labels: '' -assignees: '' - ---- - -**Does the upstream have similar features?** -`playwright-go` is just a community-driven client for [playwright](https://playwright.dev). For feature requests, please refer to other officially supported clients first. [Nodejs](https://github.com/microsoft/playwright) / [Java](https://github.com/microsoft/playwright-java) / [.Net](https://github.com/microsoft/playwright-dotnet) / [Python](https://github.com/microsoft/playwright-python) - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Additional context** -Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml deleted file mode 100644 index 825981ab..00000000 --- a/.github/workflows/build.yml +++ /dev/null @@ -1,112 +0,0 @@ -name: Go -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version: oldstable - id: go - - name: golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - version: latest - test: - strategy: - fail-fast: false - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - browser: [chromium, firefox, webkit] - go: ['stable', 'oldstable'] - runs-on: ${{ matrix.os }} - name: ${{ matrix.browser }} on ${{ matrix.os }}, go ${{ matrix.go }} - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go }} - id: go - - name: Cache drivers - uses: actions/cache@v4 - with: - # In order: - # * Driver for linux - # * Driver for macOS - # * Driver for windows - path: | - ~/.cache/ms-playwright-go - ~/.cache/ms-playwright - ~/Library/Caches/ms-playwright-go - ~/Library/Caches/ms-playwright - ~\AppData\Local\ms-playwright-go - ~\AppData\Local\ms-playwright - key: ${{ runner.os }}-go${{ matrix.go }}-${{ matrix.browser }}-${{ hashFiles('**/run.go') }} - - run: | - go install ./... - playwright install --with-deps ${{ matrix.browser }} - - name: Test - env: - BROWSER: ${{ matrix.browser }} - GOEXPERIMENT: nocoverageredesign - if: matrix.os == 'ubuntu-latest' - run: xvfb-run go test -timeout 15m -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 -timeout 15m -v -covermode atomic -coverprofile=covprofile -coverpkg="github.com/playwright-community/playwright-go" --race ./... - - name: Install goveralls - run: go install github.com/mattn/goveralls@latest - - name: Send coverage - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - continue-on-error: true - run: goveralls -coverprofile=covprofile -service=github -parallel -flagname="${{ matrix.os }}-${{ matrix.browser }}" - finish: - if: ${{ always() }} - needs: test - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: oldstable - id: go - - name: Install goveralls - run: go install github.com/mattn/goveralls@latest - - name: Finish - run: goveralls -service=github -parallel-finish - env: - COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }} - test-examples: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Set up Go 1.x - uses: actions/setup-go@v5 - with: - go-version: oldstable - id: go - - run: | - go install ./... - playwright install --with-deps - - name: Run examples - run: | - for dir in examples/*; do - echo "::group::go run $dir/main.go" - xvfb-run -a go run $dir/main.go - echo "::endgroup::" - done diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 78b8b722..00000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Docs -on: - push: - branches: [ main ] -jobs: - deploy: - name: Deploy docs - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v4 - - uses: ruby/setup-ruby@v1 - with: - ruby-version: '3.3' - - name: Install Ruby dependencies - run: bundler install - working-directory: docs - - name: Build site - run: jekyll build - - name: Deploy - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./_site \ No newline at end of file diff --git a/.github/workflows/verify_type_generation.yml b/.github/workflows/verify_type_generation.yml deleted file mode 100644 index 4fa433d5..00000000 --- a/.github/workflows/verify_type_generation.yml +++ /dev/null @@ -1,30 +0,0 @@ -name: Verify Types -on: - push: - branches: [ main ] - pull_request: - branches: [ main ] -jobs: - verify: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: oldstable - - name: Install gofumpt - run: go install mvdan.cc/gofumpt@latest - - name: Install Browsers - run: | - go install ./... - playwright install --with-deps - - name: Regenerate APIs - run: | - git config --global user.email "no-reply@github.com" - git config --global user.name "Github Actions" - go generate - - name: Verify API is up to date - run: git diff --exit-code --ignore-submodules --ignore-cr-at-eol --ignore-space-at-eol \ No newline at end of file diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 83e23552..00000000 --- a/.gitignore +++ /dev/null @@ -1,34 +0,0 @@ -# Created by https://www.toptal.com/developers/gitignore/api/go -# Edit at https://www.toptal.com/developers/gitignore?templates=go - -### Go ### -# Binaries for programs and plugins -*.exe -*.exe~ -*.dll -*.so -*.dylib - -# Test binary, built with `go test -c` -*.test - -# Output of the go coverage tool, specifically when used with LiteIDE -*.out - -# Dependency directories (remove the comment below to include it) -# vendor/ - -### Go Patch ### -/vendor/ -/Godeps/ - -# End of https://www.toptal.com/developers/gitignore/api/go -covprofile -.idea/ -.DS_Store - -api.json -_site/ -.jekyll-cache/ - -.vscode/settings.json \ No newline at end of file diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 9ab899db..00000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "playwright"] - path = playwright - url = https://github.com/microsoft/playwright diff --git a/.golangci.yaml b/.golangci.yaml deleted file mode 100644 index 1557a3f3..00000000 --- a/.golangci.yaml +++ /dev/null @@ -1,6 +0,0 @@ ---- -linters: - enable-all: false - disable-all: false - enable: - - gofumpt \ No newline at end of file diff --git a/404.html b/404.html index 086a5c9e..1cdcfdb0 100644 --- a/404.html +++ b/404.html @@ -1,9 +1,55 @@ ---- -permalink: /404.html -layout: default ---- + + +
+ -