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 provider-integration tests conditionally for PRs and to releases #2371

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/labeler.yml
Expand Up @@ -59,3 +59,11 @@ ci/run-examples:
- ".github/workflows/unit.yml"
# The examples
- "examples/**"

ci/provider-integration:
# The workflow used
- ".github/workflows/provider-integration.yml"
# The provider generator
- "packages/@cdktf/provider-generator/**"
# The tests
- "test/provider-tests/**"
17 changes: 17 additions & 0 deletions .github/workflows/pr-provider-integration.yml
@@ -0,0 +1,17 @@
name: Provider Integration Tests - PR
on:
pull_request_target:
types:
- opened
- edited
- synchronize
- labeled
- reopened

jobs:
provider_integration_test:
if: ${{ contains(github.event.pull_request.labels.*.name, ci/provider-integration') || contains(github.event.pull_request.labels.*.name, 'ci/run-all') }}
uses: ./.github/workflows/provider-integration.yml
with:
concurrency_group_prefix: pr
secrets: inherit
15 changes: 7 additions & 8 deletions .github/workflows/provider-integration.yml
@@ -1,15 +1,14 @@
name: Provider Integration Tests
on:
push:
branches:
- main
pull_request:
paths:
- "packages/@cdktf/provider-generator/**"
- "test/provider-tests/**"
workflow_call:
inputs:
concurrency_group_prefix:
default: pr
required: false
type: string

concurrency:
group: provider-${{ github.head_ref }}
group: ${{ inputs.concurrency_group_prefix }}-provider-integration-${{ github.head_ref }}
cancel-in-progress: true

jobs:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Expand Up @@ -91,6 +91,12 @@ jobs:
concurrency_group_prefix: release
secrets: inherit

provider_integration_test:
uses: ./.github/workflows/provider-integration.yml
with:
concurrency_group_prefix: release
secrets: inherit

examples:
uses: ./.github/workflows/examples.yml
with:
Expand Down Expand Up @@ -134,6 +140,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
if: needs.prepare-release.outputs.release_status == 'unreleased'
container:
Expand All @@ -158,6 +165,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
if: needs.prepare-release.outputs.release_status == 'unreleased'
container:
Expand All @@ -178,6 +186,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
if: needs.prepare-release.outputs.release_status == 'unreleased'
container:
Expand All @@ -199,6 +208,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
if: needs.prepare-release.outputs.release_status == 'unreleased'
container:
Expand All @@ -225,6 +235,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
if: needs.prepare-release.outputs.release_status == 'unreleased'
container:
Expand All @@ -246,6 +257,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
if: needs.prepare-release.outputs.release_status == 'unreleased'
container:
Expand All @@ -269,6 +281,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
if: needs.prepare-release.outputs.release_status == 'unreleased'
container:
Expand Down Expand Up @@ -325,6 +338,7 @@ jobs:
needs:
- examples
- integration_test
- provider_integration_test
- linting
- prepare-release
- release_github
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/release_next.yml
Expand Up @@ -118,6 +118,12 @@ jobs:
concurrency_group_prefix: release-next
secrets: inherit

provider_integration_test:
uses: ./.github/workflows/provider-integration.yml
with:
concurrency_group_prefix: release-next
secrets: inherit

examples:
uses: ./.github/workflows/examples.yml
with:
Expand All @@ -129,6 +135,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
runs-on: ubuntu-latest
container:
Expand All @@ -149,6 +156,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
runs-on: ubuntu-latest
container:
Expand All @@ -169,6 +177,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
runs-on: ubuntu-latest
container:
Expand All @@ -194,6 +203,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
runs-on: ubuntu-latest
container:
Expand All @@ -214,6 +224,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
runs-on: ubuntu-latest
container:
Expand All @@ -236,6 +247,7 @@ jobs:
needs:
- prepare-release
- integration_test
- provider_integration_test
- unit_test
- release_npm
runs-on: ubuntu-latest
Expand Down