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

Switch to GitHub Actions #129

Merged
merged 2 commits into from May 11, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Expand Up @@ -11,7 +11,7 @@ indent_style = tab
indent_style = space
indent_size = 4

[*.{yml,json}]
[*.{json,yaml,yml}]
indent_style = space
indent_size = 2

32 changes: 32 additions & 0 deletions .github/workflows/test.yaml
@@ -0,0 +1,32 @@
name: Test
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.17", "1.18"]
name: Test on Go ${{ matrix.go }}
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- run: go version
- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
- run: chrome --version
- name: Run tests
run: |
chrome --headless --disable-gpu --remote-debugging-port=9222 --disable-setuid-sandbox --no-sandbox about:blank &
chrome_pid=$!
go list -f '{{if len .TestGoFiles}}-coverprofile={{.Name}}_coverage.out {{.ImportPath}}{{end}}' ./... | xargs -L1 go test -race -covermode=atomic
go test ./session -browser -race -covermode=atomic -coverprofile=session_coverage.out
go test . -browser
kill -9 $chrome_pid
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true
verbose: true
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.