Skip to content

fix: selector option.HasNotText (#382) #913

fix: selector option.HasNotText (#382)

fix: selector option.HasNotText (#382) #913

Workflow file for this run

name: Go
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ^1.19.9
id: go
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
browser: [chromium, firefox, webkit]
runs-on: ${{ matrix.os }}
name: ${{ matrix.browser }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ^1.19.9
id: go
- name: Cache drivers
uses: actions/cache@v3
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.browser }}-${{ hashFiles('**/run.go') }}
- run: |
go install ./...
playwright install --with-deps ${{ matrix.browser }}
- name: Test
env:
BROWSER: ${{ matrix.browser }}
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 }}
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
- 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@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ^1.19.9
id: go
- name: Install goveralls
env:
GO111MODULE: off
run: go get github.com/mattn/goveralls
- name: Finish
run: goveralls -service=github -parallel-finish
env:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test-examples:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go 1.x
uses: actions/setup-go@v4
with:
go-version: ^1.19.9
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