This repository has been archived by the owner on Aug 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to Github Actions, add buildevents support (#52)
Switches Rotator to Github Actions away from Travis, adds support for reporting to Honeycomb Buildevents
- Loading branch information
Showing
2 changed files
with
54 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.