From d74062647b9807f57e2bf5f6c930ec55f15ca2af Mon Sep 17 00:00:00 2001 From: Carolyn Van Slyck Date: Fri, 10 Jun 2022 12:03:42 -0500 Subject: [PATCH] Add github action that builds project I've converted our Azure DevOps Pipeline to a GitHub Workflow. I split out calling each target so that it's easier to find which step failed and repeat just failing steps in the build. This is using the newer setup-go github action that has built in support for detecting which version of go to use based on the go.mod file and also caching downloaded go mods to speed up subsequent builds. Signed-off-by: Carolyn Van Slyck --- .github/workflows/build.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 00000000..50d062ed --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,28 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + +name: build +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - uses: actions/setup-go@v3 + with: + go-version-file: go.mod + cache: true + cache-dependency-path: go.sum + - name: Bootstrap + run: make bootstrap + - name: Build + run: make fetch-schemas build + - name: Build (Windows) + run: GOOS=windows make build + - name: Build (Darwin) + run: GOOS=darwin make build + - name: Lint + run: make lint + - name: Test + run: make coverage