Skip to content

Commit

Permalink
Add github action that builds project
Browse files Browse the repository at this point in the history
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 <me@carolynvanslyck.com>
  • Loading branch information
carolynvs committed Jun 10, 2022
1 parent a63ee2e commit d740626
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit d740626

Please sign in to comment.