-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moving export tests into a new workflow job
- Loading branch information
1 parent
c6d7902
commit acfda13
Showing
6 changed files
with
1,168 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
# This GitHub action runs your tests for each commit push and/or PR. Optionally | ||
# you can turn it on using a cron schedule for regular testing. | ||
# | ||
name: Export Tests | ||
on: | ||
push: | ||
paths-ignore: | ||
- 'README.md' | ||
# Run daily tests | ||
schedule: | ||
- cron: '0 10 * * *' | ||
jobs: | ||
# ensure the code builds... | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 5 | ||
steps: | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.20' | ||
id: go | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get dependencies | ||
run: | | ||
go mod download | ||
- name: Build | ||
run: | | ||
go build -v . | ||
# run acceptance tests in a matrix with Terraform core versions | ||
test: | ||
name: Export Tests | ||
needs: build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 80 | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 2 | ||
matrix: | ||
# list whatever Terraform versions here you would like to support | ||
terraform: | ||
- '1.1.7' | ||
steps: | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.20' | ||
id: go | ||
|
||
- name: Setup Terraform CLI | ||
uses: hashicorp/setup-terraform@v3.0.0 | ||
with: | ||
terraform_version: ${{ matrix.terraform }} | ||
|
||
- name: Check out code into the Go module directory | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get dependencies | ||
run: | | ||
go mod download | ||
- name: Export TF acceptance tests | ||
timeout-minutes: 80 | ||
env: | ||
TF_ACC: "1" | ||
TF_LOG: "DEBUG" | ||
TF_LOG_PATH: "../test.log" | ||
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }} | ||
|
||
GENESYSCLOUD_OAUTHCLIENT_ID: ${{ secrets.TEST_GENESYSCLOUD_OAUTHCLIENT_ID }} | ||
GENESYSCLOUD_OAUTHCLIENT_SECRET: ${{ secrets.TEST_GENESYSCLOUD_OAUTHCLIENT_SECRET }} | ||
GENESYSCLOUD_REGION: "us-east-1" | ||
GENESYSCLOUD_SDK_DEBUG: "true" | ||
GENESYSCLOUD_TOKEN_POOL_SIZE: 20 | ||
run: | | ||
if [ "$TF_ACC_TERRAFORM_VERSION" == "0.14.7" ]; then | ||
sleep 300 # This avoids conflicts with the API and other related issues e.g. too many routing email domains | ||
fi | ||
go test -timeout 80m -v -cover ./genesyscloud/tfexporter/... -coverprofile=export_coverage.out | ||
go tool cover -html=export_coverage.out -o export_cover.html | ||
- name: 'Upload Export Result' | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: export-result ${{ matrix.terraform }} | ||
path: ./.terraform/ | ||
retention-days: 5 | ||
|
||
- name: 'Upload Logs' | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: logs ${{ matrix.terraform }} | ||
path: ./export_test.log | ||
retention-days: 5 | ||
|
||
- name: 'Upload SDK Log' | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sdk_log ${{ matrix.terraform }} | ||
path: ./genesyscloud/export_sdk_debug.log | ||
retention-days: 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
examples/resources/genesyscloud_flow/inboundcall_flow_example.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
examples/resources/genesyscloud_processautomation_trigger/trigger_workflow_example.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.