Examples QA #140
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
name: Examples QA | |
on: | |
workflow_dispatch: | |
push: | |
paths: | |
- 'corellium/**' | |
- 'examples/**' | |
- 'examples_test.go' | |
branches: | |
- 'staging' | |
- 'main' | |
pull_request: | |
paths: | |
- 'corellium/**' | |
- 'examples/**' | |
- 'examples_test.go' | |
branches: | |
- 'staging' | |
- 'main' | |
types: | |
- assigned | |
- opened | |
- synchronize | |
- reopened | |
- edited | |
- ready_for_review | |
schedule: | |
- cron: '0 12 * * *' # This will run the workflow every day at 00:00 UTC | |
concurrency: | |
group: testing-concurrency-group | |
cancel-in-progress: false | |
jobs: | |
examples: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.20' | |
cache: false | |
- name: Set up Terraform | |
uses: hashicorp/setup-terraform@v2 | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# TODO: Refactor the provider installation before the launching. We are doing this because the provider is not published yet. | |
- name: Installing provider | |
run: | | |
make build | |
mkdir -p ~/.terraform.d/plugins/github.com/aimoda/corellium/1.0.0/linux_amd64/ | |
cp terraform-provider-corellium ~/.terraform.d/plugins/github.com/aimoda/corellium/1.0.0/linux_amd64/ | |
- name: Check formatting | |
run: terraform fmt -check -recursive ./examples | |
- name: Run tests | |
run: | | |
export CORELLIUM_API_TOKEN=${{ secrets.CORELLIUM_API_TOKEN }} | |
export CORELLIUM_API_HOST=${{ vars.CORELLIUM_API_HOST }} | |
export S3_BUCKET=${{ vars.S3_BUCKET }} | |
export S3_ENDPOINT=${{ vars.S3_ENDPOINT }} | |
export S3_REGION=${{ vars.S3_REGION }} | |
export S3_ACCESS_KEY=${{ vars.S3_ACCESS_KEY }} | |
export S3_SECRET_KEY=${{ secrets.S3_SECRET_KEY }} | |
export S3_SSE_KEY=${{ vars.S3_SSE_KEY }} | |
make testexamples |