Skip to content

tests

tests #54

Workflow file for this run

## Copyright © 2022-2023, Oracle and/or its affiliates.
## All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
name: tests
on:
schedule:
- cron: '0 15 * * 0'
workflow_dispatch:
jobs:
tests:
runs-on: ubuntu-latest
name: tests
env:
OCI_KEY: ${{ secrets.OCI_KEY }}
OCI_CONFIG: ${{ secrets.OCI_CONFIG }}
TENANCY_OCID: ${{ secrets.TENANCY_OCID }}
COMPARTMENT_OCID: ${{ secrets.COMPARTMENT_OCID }}
steps:
- uses: actions/checkout@v3
- name: Install OCI CLI
run: |
wget https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh
chmod +x ./install.sh
./install.sh --accept-all-defaults
mkdir -p ~/.oci
echo "$OCI_KEY" > ~/.oci/oci_ci_user.pem
echo "$OCI_CONFIG" > ~/.oci/config
echo "~/bin" >> $GITHUB_PATH
export PATH=$PATH:/home/runner/bin
oci setup repair-file-permissions --file /home/runner/.oci/config
oci setup repair-file-permissions --file /home/runner/.oci/oci_ci_user.pem
- name: Check Deps
run: |
# sudo apt list -a kubectl
# curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
# sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
# sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
# wget -O- https://apt.releases.hashicorp.com/gpg | \
# gpg --dearmor | \
# sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
# sudo apt-get install -y terraform=1.2.9 kubectl=1.24.12
# install terraform and kubectl
# sudo apt-get update
kubectl version --client=true
terraform version
- name: Run tests
run: |
pwd
export PATH=$PATH:/home/runner/bin
./tests/tests.sh
- name: Cleanup
if: always()
run: |
rm -rf ~/.oci
rm -f test.tfvars
rm -rf ./.terraform
rm -f terraform.tfstate*