Skip to content

Commit

Permalink
Switch to GitHub Actions (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
mafredri committed May 11, 2022
1 parent 39a25b4 commit 159a656
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 32 deletions.
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.

0 comments on commit 159a656

Please sign in to comment.