Skip to content

Commit

Permalink
feat: Migrate travis CI to github actions, fixes #105
Browse files Browse the repository at this point in the history
This moves the CI and release process to github actions from Travis
  • Loading branch information
dalehamel authored and fntlnz committed Oct 26, 2020
1 parent cde4149 commit 656bfea
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 26 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Kubectl trace build and tests

on: [push, pull_request]

jobs:
build_and_test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04, ubuntu-18.04] # 16.04.4 release has 4.15 kernel
# 18.04.3 release has 5.0.0 kernel
steps:
- uses: actions/checkout@v2
- name: Run tests
run: |
make test
- name: Build kubectl trace binary
run: |
make _output/bin/kubectl-trace
- name: Build CI image
run: |
./hack/ci-build-image.sh
- name: Run integration tests
run: |
make integration
- name: Build cross binaries
run: |
curl -LO https://github.com/goreleaser/goreleaser/releases/latest/download/goreleaser_amd64.deb && sudo dpkg -i goreleaser_amd64.deb
make cross
- uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}-kubectl-trace-dist
path: _output/bin/kubectl-trace
- uses: actions/upload-artifact@v1
with:
name: ${{ matrix.os }}-kubectl-trace-cross-dist
path: dist
- name: Upload docker image
if: >
github.ref == 'ref/head/master'
run: |
./hack/ci-release-image.sh
26 changes: 26 additions & 0 deletions .github/workflows/goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: goreleaser

on:
push:
tags:
- '*'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.14
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

0 comments on commit 656bfea

Please sign in to comment.