Skip to content

chore: roll to Playwright v1.43.0 (#449) #980

chore: roll to Playwright v1.43.0 (#449)

chore: roll to Playwright v1.43.0 (#449) #980

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@v4
- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ^1.19.9
cache: false
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@v4
with:
submodules: true
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ^1.19.9
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.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 -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
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: ^1.19.9
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: ^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