Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Add Grafana version test coverage #366

Merged
merged 14 commits into from
Sep 19, 2024
14 changes: 9 additions & 5 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# Requirements

The `main` branch of `grafana-build` should be compatible with all active versions of Grafana **and Grafana-Enterprise**.
The `main` branch of `grafana-build` should be compatible with all active versions of Grafana **and Grafana-Enterprise**. To
run integration tests, add a comment to this PR with the following:

```
/grafana-integration-tests
```

* [ ] I have added the `/grafana-integration-tests` comment to this PR
* [ ] All integration tests have passed

* [ ] I have tested this against `main` in Grafana.
* [ ] I have tested this against `main` in Grafana Enterprise.
* [ ] I have tested this against all active version branches of Grafana (v10.0.x, v10.1.x, v10.2.x, etc).
* [ ] I have tested this against all active version branches of Grafana Enterprise (v10.0.x, v10.1.x, v10.2.x, etc).
63 changes: 63 additions & 0 deletions .github/workflows/pr-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: PR Integration tests

on:
pull_request: {}
issue_comment:
types: [created]

jobs:
grafana-integration-test:
runs-on: ubuntu-latest
strategy:
matrix:
version: [main, v11.2.x, v11.1.x, v11.0.x, v10.4.x, v10.3.x]
type: [oss, enterprise]
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Checkout grafana
uses: actions/checkout@v4
with:
repository: grafana/grafana
ref: ${{ matrix.version }}
path: grafana
- name: Checkout grafana-enterprise
if: matrix.type == 'enterprise'
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: grafana/grafana-enterprise
ref: ${{ matrix.version }}
path: grafana-enterprise
- name: Clean runner
run: |
df -h
docker builder prune -f
docker system prune -a -f
sudo rm -rf /opt/google/chrome
sudo rm -rf /opt/microsoft/msedge
sudo rm -rf /opt/microsoft/powershell
sudo rm -rf /opt/pipx
sudo rm -rf /usr/lib/mono
sudo rm -rf /usr/local/julia*
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/lib/node_modules
sudo rm -rf /usr/local/share/chromium
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/share/swift
df -h
- name: OSS tests
uses: dagger/dagger-for-github@v6
if: matrix.type == 'oss'
with:
verb: run
args: go run ./cmd artifacts -a targz:grafana:linux/amd64 --grafana-dir=grafana
- name: Enterprise tests
uses: dagger/dagger-for-github@v6
if: matrix.type == 'enterprise'
with:
verb: run
args: go run ./cmd artifacts -a targz:grafana-enterprise:linux/amd64 --grafana-dir=grafana --enterprise-dir=grafana-enterprise
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ jobs:
with:
go-version: stable
cache: true
- run: "go test ./... -v"
- run: "go test ./... -v"
2 changes: 1 addition & 1 deletion arguments/golang.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

const (
DefaultGoVersion = "1.23.0"
DefaultGoVersion = "1.23.1"
DefaultViceroyVersion = "v0.4.0"
)

Expand Down
Loading