-
Notifications
You must be signed in to change notification settings - Fork 213
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI build and unit-test for custom-metrics-stackdriver-adapter
- Loading branch information
1 parent
8d6ceab
commit bc8e275
Showing
1 changed file
with
63 additions
and
0 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,63 @@ | ||
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: Setup environment | ||
run: | | ||
make install-tools | ||
- name: Unit tests | ||
run: | | ||
cd custom-metrics-stackdriver-adapter: | ||
make test-unit | ||
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: Setup environment | ||
run: | | ||
make install-tools | ||
- name: Build | ||
run: | | ||
cd custom-metrics-stackdriver-adapter: | ||
make build |