Skip to content

Commit

Permalink
Merge pull request #624 from CatherineF-dev/ci
Browse files Browse the repository at this point in the history
Add CI build and unit-test for custom-metrics-stackdriver-adapter
  • Loading branch information
CatherineF-dev authored Jan 10, 2024
2 parents 1a599fc + b1b15c7 commit 755ef2f
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: continuous-integration

on:
push:
branches:
- master
tags:
- v0.*
pull_request:
branches:
- master

permissions:
contents: read

env:
SUDO: sudo
GO_VERSION: "^1.21"

jobs:
ci-unit-tests-custom-metrics-stackdriver-adapter:
name: ci-unit-tests-custom-metrics-stackdriver-adapter
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Unit tests
run: |
cd custom-metrics-stackdriver-adapter
make test
ci-build-custom-metrics-stackdriver-adapter:
name: ci-build-custom-metrics-stackdriver-adapter
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4

- name: Set up Go 1.x
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
id: go

- name: Build
run: |
cd custom-metrics-stackdriver-adapter
make build

0 comments on commit 755ef2f

Please sign in to comment.