Skip to content

Commit

Permalink
Fix test and add changelog for 0.7.0 (#84)
Browse files Browse the repository at this point in the history
* Fix test and add changelog for 0.7.0

Signed-off-by: Ross Fairbanks <[email protected]>

* chore: Updates and fixes for github actions

Signed-off-by: Ross Fairbanks <[email protected]>

* fix: Checkout version

Signed-off-by: Ross Fairbanks <[email protected]>

---------

Signed-off-by: Ross Fairbanks <[email protected]>
  • Loading branch information
rossf7 authored Jun 11, 2024
1 parent cc6e43d commit 3d2b9ac
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 22 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/docker-integration-test.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
name: docker-integration-test
on: [push]
on: [pull_request, push]
jobs:
docker-integration-test:
runs-on: ubuntu-latest
steps:
-
name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v5
-
name: Go build
run: CGO_ENABLED=0 GOOS=linux go build -o grid-intensity .
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Docker build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
load: true
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/docker-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
- name: Go build
run: CGO_ENABLED=0 GOOS=linux go build -o grid-intensity .
- name: Docker metadata
Expand All @@ -27,9 +29,9 @@ jobs:
type=ref,event=branch
type=semver,pattern={{version}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
- name: Login to Scaleway Registry
uses: docker/login-action@v2
with:
Expand All @@ -38,7 +40,7 @@ jobs:
password: ${{ secrets.SCALEWAY_REGISTRY_PASSWORD }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-releaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
-
name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
-
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/go-unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ jobs:
steps:
-
name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v5
-
name: Go test
run: go test ./...
13 changes: 8 additions & 5 deletions .github/workflows/kubernetes-integration-test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: kubernetes-integration-test
on: [push]
on: [pull_request, push]
jobs:
kubernetes-integration-test:
env:
Expand All @@ -8,19 +8,22 @@ jobs:
steps:
-
name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v5
-
name: Go build
run: CGO_ENABLED=0 GOOS=linux go build -o grid-intensity .
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Docker build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
load: true
Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/nomad-integration-test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: nomad-integration-test
on: [push]
on: [pull_request, push]
jobs:
nomad-integration-test:
env:
Expand All @@ -9,19 +9,22 @@ jobs:
steps:
-
name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
-
name: Set up Go
uses: actions/setup-go@v5
-
name: Go build
run: CGO_ENABLED=0 GOOS=linux go build -o grid-intensity .
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Docker build
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: .
load: true
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Unreleased

## 0.7.0 2024-06-11

### Changed

- Breaking change to add timestamps to exporter metrics with when provider
last updated the value.
- Update Electricity Maps provider to return both estimated and actual values.
Note: There is a delay before actual values are available.
- Update location parameter to support multiple locations separated with a
comma.

## 0.6.0 2024-05-15

### Changed
Expand Down
2 changes: 1 addition & 1 deletion integration/test/exporter/metric_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func Test_GridIntensityMetric(t *testing.T) {
region = "global"
}

expectedMetricText := fmt.Sprintf("grid_intensity_carbon_average{location=\"GBR\",node=\"%s\",provider=\"Ember\",region=\"%s\",units=\"gCO2e per kWh\"}",
expectedMetricText := fmt.Sprintf("grid_intensity_carbon_average{is_estimated=\"true\",location=\"GBR\",node=\"%s\",provider=\"Ember\",region=\"%s\",units=\"gCO2e per kWh\"}",
node, region)

if !strings.Contains(metrics, expectedMetricText) {
Expand Down

0 comments on commit 3d2b9ac

Please sign in to comment.