From 0c10c3119c481d24eed1d4149f2b46a7f574fba0 Mon Sep 17 00:00:00 2001 From: Isabelle Miller Date: Fri, 6 Dec 2024 12:57:47 +0100 Subject: [PATCH 1/2] also run tests on cron --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b1819bbb..b3b7cc1c 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,6 +5,8 @@ on: pull_request: push: branches: [main] + schedule: # runs tests once a day on the main branch + - cron: "0 0 * * *" # Testing only needs permissions to read the repository contents. permissions: From 957c6600743faadc1fa5276e46557bfbb3434eda Mon Sep 17 00:00:00 2001 From: Isabelle Miller Date: Fri, 6 Dec 2024 12:58:19 +0100 Subject: [PATCH 2/2] remove .circleci directory --- .circleci/config.yml | 139 ------------------------------------------- 1 file changed, 139 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index a0060173..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,139 +0,0 @@ -# Golang CircleCI 2.1 configuration file for terraform-provider-launchdarkly-private tests -version: 2.1 - -orbs: - go: circleci/go@1.7.0 - linter: talkiq/linter@3.2.0 - slack: circleci/slack@4.7.1 - terraform: circleci/terraform@3.2.1 - -commands: - notify-slack-of-failures: - parameters: - branch_pattern: - type: string - default: main - steps: - - slack/notify: - branch_pattern: <> - channel: CLR408M4Y #proj-terraform - event: fail - custom: | - {"text":"A terraform provider test failed","blocks":[{"type":"section", - "text":{"type":"mrkdwn","text":":terraform-on-fire: A terraform provider *${CIRCLE_JOB}* job failed"}}, - {"type":"context","elements":[{"type":"mrkdwn","text":"branch: _${CIRCLE_BRANCH}_"}]},{"type":"actions","elements": - [{"type":"button","text":{"type":"plain_text","text":"View job"},"url":"${CIRCLE_BUILD_URL}"}]}]} - -jobs: - test: - executor: - name: go/default - tag: &go_version "1.21.3" - - environment: - # sc-146360 - overrides the default timeout of 3000ms when reaching checkpoint-api.hashicorp.com - CHECKPOINT_TIMEOUT: 15000 - - steps: - - checkout - - go/mod-download-cached - - run: - name: Run unit tests - command: TESTARGS="-v" make test - - run: - name: Test Data Sources - command: TESTARGS="-run TestAccDataSource" make testacc-with-retry - - run: - name: Test Access Token Resource - command: TESTARGS="-run TestAccAccessToken" make testacc-with-retry - - run: - name: Test Audit Log Subscription Resource - command: TESTARGS="-run TestAccAuditLogSubscription" make testacc-with-retry - - run: - name: Test Custom Role Resource - command: TESTARGS="-run TestAccCustomRole" make testacc-with-retry - - run: - name: Test Destination Resource - command: TESTARGS="-run TestAccDestination" make testacc-with-retry - - run: - name: Test Environment Resource - command: TESTARGS="-run TestAccEnvironment" make testacc-with-retry - - run: - name: Test Feature Flag Resource - command: TESTARGS="-run TestAccFeatureFlag_" make testacc-with-retry - - run: - name: Test Feature Flag Environment Resource - command: TESTARGS="-run TestAccFeatureFlagEnvironment" make testacc-with-retry - - run: - name: Test Flag Trigger Resource - command: TESTARGS="-run TestAccFlagTrigger" make testacc-with-retry - - run: - name: Test Metric Resource - command: TESTARGS="-run TestAccMetric" make testacc-with-retry - - run: - name: Test Project Resource - command: TESTARGS="-run TestAccProject" make testacc-with-retry - - run: - name: Test Relay Proxy Configuration Resource - command: TESTARGS="-run TestAccRelayProxy" make testacc-with-retry - - run: - name: Test Segment Resource - command: TESTARGS="-run TestAccSegment" make testacc-with-retry - - run: - name: Test Team Members - command: | - TESTARGS="-run TestAccTeamMember_CreateGeneric" make testacc-with-retry - TESTARGS="-run TestAccTeamMember_UpdateGeneric" make testacc-with-retry - TESTARGS="-run TestAccTeamMember_CreateWithCustomRole" make testacc-with-retry - TESTARGS="-run TestAccTeamMember_UpdateWithCustomRole" make testacc-with-retry - - run: - name: Test Team Resource - command: TESTARGS="-run TestAccTeam_" make testacc-with-retry - - run: - name: Test Team Role Mapping Resource - command: TESTARGS="-run TestAccTeamRoleMapping_" make testacc-with-retry - - run: - name: Test Webhook Resource - command: TESTARGS="-run TestAccWebhook" make testacc-with-retry - - notify-slack-of-failures - - lint: - executor: - name: go/default - tag: *go_version - - steps: - - checkout - - go/mod-download-cached - - run: - name: Install python - command: | - sudo apt update - sudo apt install python3-pip python-is-python3 - - terraform/install: - terraform_version: latest - - linter/pre-commit: - cache_prefix: v1 - - notify-slack-of-failures - -workflows: - main: - jobs: - - test: - context: slack-orb - - lint: - context: slack-orb - - daily: - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - main - jobs: - - test: - context: slack-orb - - lint: - context: slack-orb