@@ -19,10 +19,17 @@ jobs:
1919 include :
2020 - python-version-short : 3.6
2121 python-version : 3.6.13
22+ vault-version : 1.5.9
2223 steps :
2324 - name : Checkout Pack Repo and CI Repos
2425 uses : StackStorm-Exchange/ci/.github/actions/checkout@master
2526
27+ - name : Checkout github.com/hvac/hvac
28+ uses : actions/checkout@v2
29+ with :
30+ path : hvac
31+ fetch-depth : 0
32+
2633 - name : Install APT Dependencies
2734 uses : StackStorm-Exchange/ci/.github/actions/apt-dependencies@master
2835 with :
@@ -34,11 +41,43 @@ jobs:
3441 cache-version : v0
3542 python-version : ${{ matrix.python-version }}
3643
37- - name : Install consul, vault, python hvac
44+ # task copied (Apache 2.0 License) from
45+ # github.com/hvac/hvac .github/workflows/lint-and-test.yml
46+ - name : Install Vault and Consul (for integration tests)
3847 working-directory : pack
3948 shell : bash
4049 run : |
41- tests/setup_testing_env.sh
50+ curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
51+ echo "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" \
52+ | sudo tee /etc/apt/sources.list.d/hashicorp.list
53+
54+ sudo apt update \
55+ -o Dir::Etc::sourceparts="-" \
56+ -o APT::Get::List-Cleanup="0" \
57+ -o Dir::Etc::sourcelist="sources.list.d/hashicorp.list"
58+
59+ sudo apt install \
60+ consul \
61+ vault=${{ matrix.vault-version }} \
62+ ;
63+
64+ # We disble cap_ipc_lock here as its generally incompatabile with GitHub
65+ # Actions' runtime environments.
66+ sudo setcap cap_ipc_lock= /usr/bin/vault
67+
68+ - name : Setup hvac symlinks
69+ shell : bash
70+ env :
71+ HVAC_DIR : ${{ github.workspace }}/hvac
72+ run : |
73+ # using symlinks allows us to import tests.utils.* without adding
74+ # the rest of the hvac tests. tests.utils also uses config_files,
75+ # so make that available too.
76+ for x in utils config_files; do
77+ rm -f ${ROOT_DIR}/tests/${x}
78+ # relative (-r) allows the symlink to work in vagrant
79+ ln -rs ${HVAC_DIR}/tests/${x} ${ROOT_DIR}/tests/${x}
80+ done
4281
4382 - name : Update virtualenv activate script
4483 # This works around an infinite recursion error with newer requests+ssl+eventlet.
0 commit comments