Skip to content

Commit

Permalink
Add github actions tests from etcd-manager
Browse files Browse the repository at this point in the history
  • Loading branch information
justinsb committed Dec 7, 2020
1 parent bbe4049 commit 8ce666d
Showing 1 changed file with 4 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
# This is a basic workflow to help you get started with Actions

name: Bazel

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2

- name: Install bazelisk
Expand All @@ -28,9 +20,10 @@ jobs:
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazelisk"
chmod +x "${GITHUB_WORKSPACE}/bin/bazelisk"
- name: Build
- name: Build etcd-manager
run: |
"${GITHUB_WORKSPACE}/bin/bazelisk" build //...
working-directory: ./etcd-manager/

test:
runs-on: ubuntu-latest
Expand All @@ -45,18 +38,7 @@ jobs:
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazelisk"
chmod +x "${GITHUB_WORKSPACE}/bin/bazelisk"
- name: Test
- name: Test etcd-manager
run: |
"${GITHUB_WORKSPACE}/bin/bazelisk" test //... --test_output=streamed
verify-gofmt:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: gofmt
run: gofmt -s -w $(find . -type f -name '*.go' | grep -v "/vendor/")

- name: fail on changes
run: git diff && git diff-index --quiet HEAD --
working-directory: ./etcd-manager/

0 comments on commit 8ce666d

Please sign in to comment.