mirror of https://github.com/mum4k/termdash.git
Defining Github action to execute Termdash CI.
Signed-off-by: Jakub Sobon <mumak@google.com>
This commit is contained in:
parent
e4ccfa3102
commit
d0cde3f172
|
@ -0,0 +1,51 @@
|
|||
# This workflow will builds and tests Termdash.
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
|
||||
|
||||
name: Go
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "master", "devel" ]
|
||||
pull_request:
|
||||
branches: [ "master", "devel" ]
|
||||
|
||||
jobs:
|
||||
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [ '1.20', 'stable' ]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Go ${{ matrix.go-version }}
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
go install golang.org/x/tools/cmd/cover@latest
|
||||
go install github.com/mattn/goveralls@latest
|
||||
go install golang.org/x/lint/golint@latest
|
||||
go get -t ./...
|
||||
|
||||
- name: Test
|
||||
run: go test -v -covermode=count -coverprofile=coverage.out ./...
|
||||
|
||||
- name: Test Race
|
||||
run: CGO_ENABLED=1 go test -race ./...
|
||||
|
||||
- name: Format
|
||||
run: diff -u <(echo -n) <(gofmt -d -s .)
|
||||
|
||||
- name: Licences
|
||||
run: diff -u <(echo -n) <(./private/scripts/autogen_licences.sh .)
|
||||
|
||||
- name: Lint
|
||||
run: diff -u <(echo -n) <(golint ./...)
|
||||
|
||||
- name: Coverage
|
||||
run: $GOPATH/bin/goveralls -coverprofile=coverage.out -service=travis-ci -repotoken $COVERALLS_TOKEN
|
|
@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- Migrated CI system from Travis to Github Actions.
|
||||
|
||||
## [0.18.0] - 08-Feb-2023
|
||||
|
||||
### Added
|
||||
|
|
Loading…
Reference in New Issue