Migrate CI from travis ci to github actions (#1355)

Ref #1352
This commit is contained in:
namusyaka
2020-11-16 11:47:55 +08:00
committed by GitHub
parent 8fcbc60969
commit 6baca72c4d
5 changed files with 59 additions and 67 deletions
+47
View File
@@ -0,0 +1,47 @@
name: Kompose CI
on: push
env:
# Avoid noisy outputs like "tput: No value for $TERM and no -T specified"
TERM: dumb
jobs:
test:
name: Test with ${{ matrix.go }} and CROSS_COMPILE=${{ matrix.cross_compile }}
runs-on: ubuntu-18.04
strategy:
matrix:
go: [1.13, 1.14]
cross_compile: [true, false]
steps:
- uses: actions/checkout@v2
- 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
if: ${{ matrix.cross_compile }}
run: make cross
docs:
name: Build docs and Coveralls integration
runs-on: ubuntu-18.04
needs: test
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Install dependencies
run: make test-dep
- name: Collect all .coverprofile files and save it to one file gover.coverprofile
run: gover
- name: Send coverage
run: goveralls -coverprofile=gover.coverprofile -service=github
env:
# As per https://github.com/mattn/goveralls#github-actions
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: ./script/sync-docs.sh
if: ${{ github.ref == 'refs/heads/master' }}