Skip to content

Commit 3585242

Browse files
committed
wip
1 parent 08cec6a commit 3585242

File tree

1 file changed

+5
-68
lines changed

1 file changed

+5
-68
lines changed

.github/workflows/testacc.yml

+5-68
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
name: Acceptance Tests
33

44
on:
5-
issue_comment:
6-
types:
7-
- created
5+
pull_request:
6+
paths-ignore:
7+
- 'README.md'
88
push:
99
branches:
1010
- main
@@ -29,64 +29,9 @@ jobs:
2929
- run: go mod download
3030
- run: go build -v .
3131

32-
comment-triggered-testacc:
33-
# This job runs on issue_comment event with /testacc command.
34-
# We will block merging to main unless this job passes
35-
# The reason we don't want to run this on every push is because it's expensive/creates real resources
36-
if: github.event.issue.pull_request && contains(github.event.comment.body, '/testacc')
37-
name: PR Terraform Provider Acceptance Tests
38-
needs: build
39-
runs-on: ubuntu-latest
40-
timeout-minutes: 15
41-
strategy:
42-
fail-fast: true
43-
matrix:
44-
# list whatever Terraform versions here you would like to support
45-
terraform:
46-
- '1.7.*'
47-
- '1.6.*'
48-
steps:
49-
- name: Get PR branch
50-
uses: xt0rted/pull-request-comment-branch@v1
51-
id: comment-branch
52-
- name: Set latest commit status as pending
53-
uses: myrotvorets/set-commit-status-action@master
54-
with:
55-
sha: ${{ steps.comment-branch.outputs.head_sha }}
56-
token: ${{ secrets.GITHUB_TOKEN }}
57-
status: pending
58-
- name: Checkout PR branch
59-
uses: actions/checkout@v3
60-
with:
61-
ref: ${{ steps.comment-branch.outputs.head_ref }}
62-
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
63-
with:
64-
go-version-file: 'go.mod'
65-
cache: true
66-
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # v3.0.0
67-
with:
68-
terraform_version: ${{ matrix.terraform }}
69-
terraform_wrapper: false
70-
- run: go mod download
71-
- env:
72-
TF_ACC: "1"
73-
ASTRO_API_TOKEN: ${{ secrets.DEV_ASTRO_API_TOKEN }}
74-
ASTRO_API_HOST: ${{ secrets.DEV_ASTRO_API_HOST }}
75-
ASTRO_ORGANIZATION_ID: ${{ secrets.DEV_ASTRO_ORGANIZATION_ID }}
76-
run: make testacc
77-
timeout-minutes: 10
78-
- name: Set latest commit status as ${{ job.status }}
79-
uses: myrotvorets/set-commit-status-action@master
80-
if: always()
81-
with:
82-
sha: ${{ steps.comment-branch.outputs.head_sha }}
83-
token: ${{ secrets.GITHUB_TOKEN }}
84-
status: ${{ job.status }}
85-
86-
main-testacc:
32+
testacc:
8733
# This job runs on push to main branch.
88-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
89-
name: Main Terraform Provider Acceptance Tests
34+
name: Terraform Provider Acceptance Tests
9035
needs: build
9136
timeout-minutes: 15
9237
strategy:
@@ -116,11 +61,3 @@ jobs:
11661
run: make testacc
11762
timeout-minutes: 10
11863

119-
debug:
120-
if: github.event_name == 'issue_comment'
121-
runs-on: ubuntu-latest
122-
steps:
123-
- name: Dump GitHub context
124-
env:
125-
GITHUB_CONTEXT: ${{ toJson(github) }}
126-
run: echo "$GITHUB_CONTEXT"

0 commit comments

Comments
 (0)