-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Github Actions: Migrate Cloud pipelines (#1119)
Migrated: - Cloud instance pipeline that runs on every PR/pushes - Cloud API pipeline that runs on-demand Will do other pipelines in another PR. I timeboxed this
- Loading branch information
1 parent
633b640
commit 3d42324
Showing
7 changed files
with
79 additions
and
197 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
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
This file was deleted.
Oops, something went wrong.
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,39 @@ | ||
name: acceptance tests | ||
on: | ||
pull_request: {} | ||
push: | ||
branches: | ||
- main | ||
- master | ||
|
||
# These permissions are needed to assume roles from Github's OIDC. | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
cloudinstance: | ||
concurrency: cloud-instance | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
- uses: hashicorp/setup-terraform@v3 | ||
- name: Get Secrets | ||
uses: grafana/shared-workflows/actions/get-vault-secrets@main | ||
with: | ||
repo_secrets: | | ||
GRAFANA_AUTH=cloud-instance-tests:auth | ||
GRAFANA_ONCALL_ACCESS_TOKEN=cloud-instance-tests:oncall-token | ||
GRAFANA_SM_ACCESS_TOKEN=cloud-instance-tests:sm-token | ||
GRAFANA_URL=cloud-instance-tests:url | ||
- uses: iFaxity/wait-on-action@v1.1.0 | ||
with: | ||
resource: ${{ env.GRAFANA_URL }} | ||
interval: 2000 # 2s | ||
timeout: 30000 # 30s | ||
- run: make testacc-cloud-instance | ||
|
||
# TODO: Enterprise + OSS tests |
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,34 @@ | ||
name: cloud acceptance tests | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tests: | ||
description: 'Tests to run (regex passed to -run)' | ||
default: '.*' | ||
|
||
# These permissions are needed to assume roles from Github's OIDC. | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
jobs: | ||
cloud: | ||
concurrency: cloud-api | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '1.21' | ||
- uses: hashicorp/setup-terraform@v3 | ||
- name: Get Secrets | ||
uses: grafana/shared-workflows/actions/get-vault-secrets@main | ||
with: | ||
repo_secrets: | | ||
GRAFANA_CLOUD_API_KEY=cloud-tests:api-key | ||
GRAFANA_CLOUD_ORG=cloud-tests:org | ||
- run: make testacc-cloud-api | ||
env: | ||
TESTARGS: -run='${{ github.event.inputs.tests }}' | ||
|
||
|
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: tests | ||
name: unit tests | ||
on: | ||
pull_request: {} | ||
push: | ||
|