GitHub Actions Part2 (#1356)

* Update CI badge

* Update CI target

* Add TODO comment

* Create .coverprofile for each directory

Re:running tests resolve 0% coverage issue.
This commit is contained in:
namusyaka 2020-11-30 15:48:09 +09:00 committed by GitHub
parent 6baca72c4d
commit 3772612ff9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 9 deletions

View File

@ -1,5 +1,9 @@
name: Kompose CI
on: push
on:
push:
branches:
- master
pull_request:
env:
# Avoid noisy outputs like "tput: No value for $TERM and no -T specified"
TERM: dumb
@ -16,10 +20,6 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Install dependencies
run: go get golang.org/x/lint/golint
- name: Build a binary
run: make bin
- name: Run tests
run: make test
- name: Perform cross compile
@ -34,8 +34,8 @@ jobs:
- uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Install dependencies
run: make test-dep
- name: Create .coverprofile for each targeted directory by re:running tests
run: make test
- name: Collect all .coverprofile files and save it to one file gover.coverprofile
run: gover
- name: Send coverage

View File

@ -122,8 +122,8 @@ __Chat (Slack):__ We're fairly active on [Slack](http://slack.kubernetes.io#komp
Participation in the Kubernetes community is governed by the [Kubernetes Code of Conduct](code-of-conduct.md).
[Build Status]: https://travis-ci.org/kubernetes/kompose
[Build Status Widget]: https://travis-ci.org/kubernetes/kompose.svg?branch=master
[Build Status]: https://github.com/kubernetes/kompose/actions?query=workflow%3A%22Kompose+CI%22
[Build Status Widget]: https://github.com/kubernetes/kompose/workflows/Kompose%20CI/badge.svg
[GoDoc]: https://godoc.org/github.com/kubernetes/kompose
[GoDoc Widget]: https://godoc.org/github.com/kubernetes/kompose?status.svg
[Coverage Status Widget]: https://coveralls.io/repos/github/kubernetes/kompose/badge.svg?branch=master

View File

@ -25,6 +25,7 @@ function convert::print_msg () {
}
function install_oc_client () {
# TODO: Confirm that this is valid for GitHub Actions.
# Valid only for Travis
convert::print_msg "Installing oc client binary ..."
sudo sed -i 's:DOCKER_OPTS=":DOCKER_OPTS="--insecure-registry 172.30.0.0/16 :g' /etc/default/docker