From ba5c286554d71a110dbbe29467c54ce4fa65cec7 Mon Sep 17 00:00:00 2001 From: Quentin Renard Date: Wed, 26 Jul 2023 16:22:40 +0200 Subject: [PATCH] Added github action --- .github/workflows/test.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 15 --------------- README.md | 2 +- 3 files changed, 34 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6512918 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,33 @@ +name: Test + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' + + - name: Install dependencies + run: go mod download + + - name: Run tests + run: go test -race -covermode atomic -coverprofile=covprofile ./... + + - name: Install goveralls + run: go install github.com/mattn/goveralls@latest + + - name: Send coverage + env: + COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} + run: goveralls -coverprofile=covprofile -service=github diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 05ca03d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: go -go: -- 1.x -- tip -install: -- go get -t ./... -- go get golang.org/x/tools/cmd/cover -- go get github.com/mattn/goveralls -- go install github.com/mattn/goveralls -matrix: - allow_failures: - - go: tip -script: -- go test -race -v -coverprofile=coverage.out -- $HOME/gopath/bin/goveralls -coverprofile=coverage.out -service=travis-ci \ No newline at end of file diff --git a/README.md b/README.md index c18e5f5..e38219a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![GoReportCard](http://goreportcard.com/badge/github.com/asticode/go-astilectron)](http://goreportcard.com/report/github.com/asticode/go-astilectron) [![GoDoc](https://godoc.org/github.com/asticode/go-astilectron?status.svg)](https://godoc.org/github.com/asticode/go-astilectron) -[![Travis](https://travis-ci.org/asticode/go-astilectron.svg?branch=master)](https://travis-ci.org/asticode/go-astilectron#) +[![Test](https://github.com/asticode/go-astilectron/actions/workflows/test.yml/badge.svg)](https://github.com/asticode/go-astilectron/actions/workflows/test.yml) [![Coveralls](https://coveralls.io/repos/github/asticode/go-astilectron/badge.svg?branch=master)](https://coveralls.io/github/asticode/go-astilectron) Thanks to `go-astilectron` build cross platform GUI apps with GO and HTML/JS/CSS. It is the official GO bindings of [astilectron](https://github.com/asticode/astilectron) and is powered by [Electron](https://github.com/electron/electron).