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
+
1
4
name : tests
2
5
on :
6
+ # workflow_dispatch
3
7
schedule :
4
- - cron : ' 0 7 * * 1 ' # Mondays at 7AM
8
+ - cron : ' 0 15 * * 7 ' # Sundays at 8AM PST
5
9
jobs :
6
10
tests :
7
11
runs-on : ubuntu-latest
@@ -14,23 +18,43 @@ jobs:
14
18
COMPARTMENT_OCID : ${{ secrets.COMPARTMENT_OCID }}
15
19
steps :
16
20
- uses : actions/checkout@v3
17
- - name : Run tests
21
+ - name : Install OCI CLI
18
22
run : |
19
- # Install OCI CLI
20
23
wget https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh
21
24
chmod +x ./install.sh
22
- bash -c " ./install.sh --accept-all-defaults"
25
+ ./install.sh --accept-all-defaults
23
26
mkdir -p ~/.oci
24
27
echo "$OCI_KEY" > ~/.oci/oci_ci_user.pem
25
28
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
27
36
# curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
28
37
# 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
31
38
# sudo apt-get update && sudo apt-get install -y gnupg software-properties-common
32
39
# wget -O- https://apt.releases.hashicorp.com/gpg | \
33
40
# gpg --dearmor | \
34
41
# sudo tee /usr/share/keyrings/hashicorp-archive-keyring.gpg
42
+ # sudo apt-get install -y terraform=1.2.9 kubectl=1.24.12
35
43
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
36
53
./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