Skip to content

Commit cdacece

Browse files
committed
Add manual acceptance workflow
1 parent d5585c1 commit cdacece

2 files changed

Lines changed: 50 additions & 1 deletion

File tree

.github/workflows/acceptance.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Acceptance
2+
3+
on:
4+
workflow_dispatch:
5+
6+
permissions:
7+
contents: read
8+
9+
concurrency:
10+
group: acceptance-${{ github.ref }}
11+
cancel-in-progress: false
12+
13+
jobs:
14+
browser-pool:
15+
name: Browser pool acceptance
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 30
18+
env:
19+
TF_ACC: "1"
20+
KERNEL_ACC: "1"
21+
KERNEL_API_KEY: ${{ secrets.KERNEL_API_KEY }}
22+
KERNEL_PROJECT_ID: ${{ secrets.KERNEL_PROJECT_ID }}
23+
KERNEL_ALT_PROJECT_ID: ${{ secrets.KERNEL_ALT_PROJECT_ID }}
24+
KERNEL_BASE_URL: ${{ secrets.KERNEL_BASE_URL }}
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v6
29+
30+
- name: Set up Go
31+
uses: actions/setup-go@v6
32+
with:
33+
go-version-file: go.mod
34+
cache: true
35+
36+
- name: Set up Terraform
37+
uses: hashicorp/setup-terraform@v4
38+
with:
39+
terraform_version: "1.15.5"
40+
terraform_wrapper: false
41+
42+
- name: Check required secrets
43+
run: |
44+
: "${KERNEL_API_KEY:?Set the KERNEL_API_KEY repository secret before running acceptance tests.}"
45+
: "${KERNEL_PROJECT_ID:?Set the KERNEL_PROJECT_ID repository secret before running acceptance tests.}"
46+
47+
- name: Run browser pool acceptance tests
48+
run: go test -count=1 -timeout=30m -v ./internal/resources/browserpool -run TestAcc

docs/release.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ Use this checklist before publishing a Kernel Terraform provider version.
1212
- Run `go test -short -timeout=2m ./...`.
1313
- Run `go vet ./...`.
1414
- Run opt-in acceptance tests with real credentials before the first public v0 release:
15-
- `TF_ACC=1 KERNEL_ACC=1 KERNEL_API_KEY=... KERNEL_PROJECT_ID=... go test ./internal/resources/browserpool -run TestAcc`
15+
- `TF_ACC=1 KERNEL_ACC=1 KERNEL_API_KEY=... KERNEL_PROJECT_ID=... go test -count=1 -timeout=30m -v ./internal/resources/browserpool -run TestAcc`
16+
- or run the manual `Acceptance` GitHub Actions workflow with `KERNEL_API_KEY` and `KERNEL_PROJECT_ID` repository secrets configured.
1617
- Verify unscoped API calls send no `X-Kernel-Project-Id` header; it is sent only when a resource-level `project_id` or the provider default resolves a project.
1718
- Confirm `terraform-registry-manifest.json` contains protocol `["6.0"]` for Terraform Plugin Framework.
1819
- Confirm there is no branch named like the release tag, for example `v0.1.0`.

0 commit comments

Comments
 (0)