1+ # # Copyright © 2022-2023, Oracle and/or its affiliates.
2+ # # All rights reserved. The Universal Permissive License (UPL), Version 1.0 as shown at http://oss.oracle.com/licenses/upl
3+
14name : tests
25on :
6+ # workflow_dispatch
37 schedule :
4- - cron : ' 0 7 * * 1 ' # Mondays at 7AM
8+ - cron : ' 0 15 * * 7 ' # Sundays at 8AM PST
59jobs :
610 tests :
711 runs-on : ubuntu-latest
@@ -14,23 +18,43 @@ jobs:
1418 COMPARTMENT_OCID : ${{ secrets.COMPARTMENT_OCID }}
1519 steps :
1620 - uses : actions/checkout@v3
17- - name : Run tests
21+ - name : Install OCI CLI
1822 run : |
19- # Install OCI CLI
2023 wget https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh
2124 chmod +x ./install.sh
22- bash -c " ./install.sh --accept-all-defaults"
25+ ./install.sh --accept-all-defaults
2326 mkdir -p ~/.oci
2427 echo "$OCI_KEY" > ~/.oci/oci_ci_user.pem
2528 echo "$OCI_CONFIG" > ~/.oci/config
26- # install terraform and kubectl
29+ echo "~/bin" >> $GITHUB_PATH
30+ export PATH=$PATH:/home/runner/bin
31+ oci setup repair-file-permissions --file /home/runner/.oci/config
32+ oci setup repair-file-permissions --file /home/runner/.oci/oci_ci_user.pem
33+ - name : Check Deps
34+ run : |
35+ # sudo apt list -a kubectl
2736 # curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
2837 # sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
29- sudo apt-get update
30- sudo apt-get install -y terraform=1.2.9 kubectl=1.24.12
3138 # sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
3239 # wget -O- https://apt.releases.hashicorp.com/gpg | \
3340 # gpg --dearmor | \
3441 # sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
42+ # sudo apt-get install -y terraform=1.2.9 kubectl=1.24.12
3543
44+ # install terraform and kubectl
45+ # sudo apt-get update
46+ kubectl version --client=true
47+ terraform version
48+
49+ - name : Run tests
50+ run : |
51+ pwd
52+ export PATH=$PATH:/home/runner/bin
3653 ./tests/tests.sh
54+ - name : Cleanup
55+ if : always()
56+ run : |
57+ rm -rf ~/.oci
58+ rm -f test.tfvars
59+ rm -rf ./.terraform
60+ rm -f terraform.tfstate*
0 commit comments