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 expression paranthesis #2332

Merged
merged 16 commits into from Nov 24, 2022
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
55 changes: 55 additions & 0 deletions .github/labeler.yml
@@ -0,0 +1,55 @@
ci/run-unit/@cdktf/cli-core:
# The workflow used
- ".github/workflows/unit.yml"
# All packages under test
- "packages/@cdktf/cli-core/**"
# All scripts we use
- "tools/align-version.sh"
Comment on lines +2 to +7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering whether we could simplify this config by adding ci/run-unit with those two repeated files (that are common for all individual unit labels currently). It would then effectively run all unit tests if we change those files while not spamming the PR with all individual unit test labels 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good, will do it in a follow-up though


ci/run-unit/@cdktf/commons:
# The workflow used
- ".github/workflows/unit.yml"
# All packages under test
- "packages/@cdktf/commons/**"
# All scripts we use
- "tools/align-version.sh"

ci/run-unit/@cdktf/hcl2cdk:
# The workflow used
- ".github/workflows/unit.yml"
# All packages under test
- "packages/@cdktf/hcl2cdk/**"
# All scripts we use
- "tools/align-version.sh"

ci/run-unit/@cdktf/hcl2json:
# The workflow used
- ".github/workflows/unit.yml"
# All packages under test
- "packages/@cdktf/hcl2json/**"
# All scripts we use
- "tools/align-version.sh"

ci/run-unit/@cdktf/provider-generator:
# The workflow used
- ".github/workflows/unit.yml"
# All packages under test
- "packages/@cdktf/provider-generator/**"
# All scripts we use
- "tools/align-version.sh"

ci/run-unit/cdktf-cli:
# The workflow used
- ".github/workflows/unit.yml"
# All packages under test
- "packages/cdktf-cli/**"
# All scripts we use
- "tools/align-version.sh"

ci/run-unit/cdktf:
# The workflow used
- ".github/workflows/unit.yml"
# All packages under test
- "packages/cdktf/**"
# All scripts we use
- "tools/align-version.sh"
3 changes: 1 addition & 2 deletions .github/workflows/examples-pr.yml
@@ -1,6 +1,5 @@
name: Examples - PR
on:
pull_request: {}
pull_request_target:
types:
- opened
Expand All @@ -11,7 +10,7 @@ on:

jobs:
examples:
if: contains(github.event.pull_request.labels.*.name, 'ci/run-examples') || contains(github.event.pull_request.labels.*.name, 'ci/run-all')
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-examples') || contains(github.event.pull_request.labels.*.name, 'ci/run-all') }}
uses: ./.github/workflows/examples.yml
with:
concurrency_group_prefix: pr
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/integration-pr.yml
@@ -1,6 +1,5 @@
name: Integration Tests - PR
on:
pull_request: {}
pull_request_target:
types:
- opened
Expand All @@ -11,7 +10,7 @@ on:

jobs:
integration_test:
if: contains(github.event.pull_request.labels.*.name, 'ci/run-integration') || contains(github.event.pull_request.labels.*.name, 'ci/run-all')
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-integration') || contains(github.event.pull_request.labels.*.name, 'ci/run-all') }}
uses: ./.github/workflows/integration.yml
with:
concurrency_group_prefix: pr
Expand Down
@@ -1,9 +1,20 @@
name: PR Size label

name: "Pull Request Labeler"
on: [pull_request]

jobs:
labeler:
pr_ci_trigger:
permissions:
contents: read
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v4
with:
# The config file lives under .github/labeler.yml
repo-token: "${{ secrets.GITHUB_TOKEN }}"
sync-labels: false # If set to true we could not easily overwrite it individually

pr_size:
runs-on: ubuntu-latest
name: Label the PR size
steps:
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/release_next.yml
Expand Up @@ -3,11 +3,6 @@ on:
push:
branches:
- main
paths:
- "packages/**"
- "tools/**"
- "package.json"
- "yarn.lock"

env:
SENTRY_ORG: hashicorp
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/unit-@cdktf-api-core.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/unit-@cdktf-commons.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/unit-@cdktf-hcl2cdk.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/unit-@cdktf-hcl2json.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/unit-@cdktf-provider-generator.yml

This file was deleted.

95 changes: 93 additions & 2 deletions .github/workflows/unit-all.yml
Expand Up @@ -10,8 +10,8 @@ on:
- reopened

jobs:
unit_test_for_prs:
if: contains(github.event.pull_request.labels.*.name, 'ci/run-unit') || contains(github.event.pull_request.labels.*.name, 'ci/run-all')
all_unit_tests:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit') || contains(github.event.pull_request.labels.*.name, 'ci/run-all') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
Expand All @@ -32,3 +32,94 @@ jobs:
package: ${{ matrix.package }}
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit

cdktf_cli_core:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/cli-core') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.2.8"]
with:
concurrency_group_prefix: pr-cdktf-cli-core
package: "@cdktf/cli-core"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit

cdktf_commons:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/commons') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.2.8"]
with:
concurrency_group_prefix: pr-cdktf-commons
package: "@cdktf/commons"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit

cdktf_hcl2cdk:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/hcl2cdk') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.2.8"]
with:
concurrency_group_prefix: pr-cdktf-hcl2cdk
package: "@cdktf/hcl2cdk"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit

cdktf_hcl2json:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/hcl2json') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.2.8"]
with:
concurrency_group_prefix: pr-cdktf-hcl2json
package: "@cdktf/hcl2json"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit

cdktf_provider_generator:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/@cdktf/provider-generator') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.2.8"]
with:
concurrency_group_prefix: pr-cdktf-provider-generator
package: "@cdktf/provider-generator"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit

cdktf_cli:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/cdktf-cli') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.2.8"]
with:
concurrency_group_prefix: pr-cdktf-cli
package: "cdktf-cli"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit

cdktf:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci/run-unit/cdktf') }}
uses: ./.github/workflows/unit.yml
strategy:
fail-fast: false
matrix:
terraform_version: ["1.2.8"]
with:
concurrency_group_prefix: pr-cdktf
package: "cdktf"
terraform_version: ${{ matrix.terraform_version }}
secrets: inherit
24 changes: 0 additions & 24 deletions .github/workflows/unit-cdktf-cli.yml

This file was deleted.