Skip to content

Commit

Permalink
Run integration tests on main/tags (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
omus authored Jan 21, 2025
1 parent 7f9a96e commit 9b5598d
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ on:
- "apply/action.yaml"
- "destroy/action.yaml"
- ".github/workflows/integration-tests.yaml"
push:
branches: ["main"]
tags: ["*"]
paths:
- "apply/action.yaml"
- "destroy/action.yaml"
- ".github/workflows/integration-tests.yaml"

env:
# Use separate Terraform workspaces for PRs, tags, and each commit on "main".
workspace: ${{ github.event_name == 'pull_request' && format('pr-{0}', github.event.number) ||
(github.event_name == 'push' && (github.ref_type == 'tag' && format('tag-{0}', github.ref_name) || format('sha-{0}', github.sha)) ||
'unknown') }}

jobs:
test:
Expand All @@ -25,7 +38,7 @@ jobs:
uses: ./apply
with:
dir: .github/terraform
workspace: ${{ github.event.number }}
workspace: ${{ env.workspace }}
variables: |-
image: nginx:latest
optional:
Expand All @@ -42,7 +55,7 @@ jobs:
with:
with:
dir: .github/terraform
workspace: ${{ github.event.number }}
workspace: ${{ env.workspace }}
variables: |-
image: nginx:latest
optional:
Expand Down

0 comments on commit 9b5598d

Please sign in to comment.