Skip to content
This repository has been archived by the owner on Aug 10, 2023. It is now read-only.

Commit

Permalink
Switch to Github Actions, add buildevents support (#52)
Browse files Browse the repository at this point in the history
Switches Rotator to Github Actions away from Travis, adds support for reporting to Honeycomb Buildevents
  • Loading branch information
mbarrien authored Jun 10, 2020
1 parent 50604f9 commit 09699c2
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 22 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
on: push

jobs:
test:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '1.14.1'
- run: go version
- name: Setup buildevents
uses: kvrhdn/gha-buildevents@44a0f39
with:
apikey: ${{ secrets.BUILDEVENT_APIKEY }}
dataset: buildevents
# Required: the job status, this will be used in the post section and sent
# as status of the trace. Must always be ${{ job.status }}.
job-status: ${{ job.status }}

- run: |
echo ::set-env name=STEP_START::$(date +%s)
echo ::set-env name=STEP_ID::$(echo install | sum | cut -f 1 -d \ )
- name: Install dependencies
run: |
buildevents cmd $TRACE_ID $STEP_ID make-setup -- make setup
buildevents step $TRACE_ID $STEP_ID $STEP_START install
- run: |
echo ::set-env name=STEP_START::$(date +%s)
echo ::set-env name=STEP_ID::$(echo script | sum | cut -f 1 -d \ )
- name: Run tests
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.REVIEWDOG_GITHUB_API_TOKEN }}
run: |
buildevents cmd $TRACE_ID $STEP_ID codecov-validate -- curl --data-binary @codecov.yml https://codecov.io/validate
buildevents cmd $TRACE_ID $STEP_ID make-test -- make test
buildevents step $TRACE_ID $STEP_ID $STEP_START script
- run: |
echo ::set-env name=STEP_START::$(date +%s)
echo ::set-env name=STEP_ID::$(echo lint | sum | cut -f 1 -d \ )
- name: Run lint
run: |
buildevents cmd $TRACE_ID $STEP_ID make-lint-ci -- make lint-ci
buildevents step $TRACE_ID $STEP_ID $STEP_START lint
- run: |
echo ::set-env name=STEP_START::$(date +%s)
echo ::set-env name=STEP_ID::$(echo after_success | sum | cut -f 1 -d \ )
- name: Run codecov
run:
buildevents cmd $TRACE_ID $STEP_ID codecov-upload -- bash <(curl -s https://codecov.io/bash)
buildevents step $TRACE_ID $STEP_ID $STEP_START after_success
22 changes: 0 additions & 22 deletions .travis.yml

This file was deleted.

0 comments on commit 09699c2

Please sign in to comment.