Skip to content

Examples QA

Examples QA #115

Workflow file for this run

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