Skip to content
This repository has been archived by the owner on May 26, 2024. It is now read-only.

[Fix] - Properly implement async-trait #55

[Fix] - Properly implement async-trait

[Fix] - Properly implement async-trait #55

Workflow file for this run

name: Run scans and tests on Rust repos
on:
pull_request:
branches:
- develop
- master
env:
ARM_SUBSCRIPTION_ID: '${{ secrets.ARM_SUBSCRIPTION_ID }}'
ARM_TENANT_ID: '${{ secrets.ARM_TENANT_ID }}'
ARM_CLIENT_ID: '${{ secrets.ARM_CLIENT_ID }}'
ARM_CLIENT_SECRET: '${{ secrets.ARM_CLIENT_SECRET }}'
jobs:
ci-ct-job-for-rust-repos:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@master
- name: Set up Terraform
uses: hashicorp/setup-terraform@v3
- name: Terraform Init
id: init
run: |
terraform init
# -backend-config="subscription_id=${{ inputs.AZ_SUBSCRIPTION_ID }}" \
# -backend-config="storage_account_name=${{ inputs.AZ_STORAGE_ACCOUNT_NAME }}" \
# -backend-config="resource_group_name=${{ inputs.AZ_RESOURCE_GROUP_NAME }}" \
# -backend-config="container_name=${{ inputs.AZ_STORAGE_ACCOUNT_CONTAINER_NAME }}" \
# -backend-config="key=azure-rg/terraform.tfstate"
working-directory: ./devops/terraform
- name: Terraform Apply
id: apply
run: terraform apply --auto-approve
continue-on-error: false
working-directory: ./devops/terraform
- name: Resolve terraform outputs
id: resolve_terraform_outputs
run: |
sudo apt-get install -y jq
cd ./devops/terraform
echo "azure_account_name=$(terraform output -json storage_account_name_list | jq -r --argjson index 0 '.[$index]')" >> $GITHUB_OUTPUT
echo "azure_access_key=$(terraform output -json storage_account_primary_access_key_list | jq -r --argjson index 0 '.[$index]')" >> $GITHUB_OUTPUT
echo "azure_container_name=$(terraform output -json storage_account_container_name_list | jq -r --argjson index 0 '.[$index]')" >> $GITHUB_OUTPUT
cd -
working-directory: ./
- name: Test Rust repository
uses: MGTheTrain/public-github-actions/.github/actions/test-rust-repository@main
with:
WORKING_DIRECTORY: ./
env:
AZURE_ACCOUNT_NAME: ${{ steps.resolve_terraform_outputs.outputs.azure_account_name }}
AZURE_ACCESS_KEY: ${{ steps.resolve_terraform_outputs.outputs.azure_access_key }}
AZURE_CONTAINER_NAME: ${{ steps.resolve_terraform_outputs.outputs.azure_container_name }}
- name: Sleep for 16 seconds
run: sleep 16
- name: Terraform Destroy
id: destroy
run: terraform destroy --auto-approve
continue-on-error: false
working-directory: ./devops/terraform