Skip to content

Debug ci

Debug ci #223

Workflow file for this run

name: CI
on:
workflow_call:
pull_request:
schedule:
# NOTE: We run this weekly at 1 am UTC on every Saturday
- cron: '0 1 * * 6'
jobs:
# This is based on this workflow, with an additional test env setup method
# StackStorm-Exchange/ci/.github/workflows/pack-build_and_test.yaml@master
build_and_test:
runs-on: ubuntu-22.04
name: 'Build and Test / Python ${{ matrix.python-version-short }}'
strategy:
matrix:
include:
- python-version-short: "3.9"
python-version: 3.9.21
consul-version: "1.22.7-1"
vault-version: "2.0.0-1"
hvac-gh-tag: "v2.4.0"
- python-version-short: "3.10"
python-version: 3.10.16
consul-version: "1.22.7-1"
vault-version: "2.0.0-1"
hvac-gh-tag: "v2.4.0"
- python-version-short: "3.11"
python-version: 3.11.11
consul-version: "1.22.7-1"
vault-version: "2.0.0-1"
hvac-gh-tag: "v2.4.0"
steps:
- name: Checkout Pack Repo and CI Repos
uses: StackStorm-Exchange/ci/.github/actions/checkout@master
- name: Checkout github.com/hvac/hvac
uses: actions/checkout@v2
with:
path: hvac
repository: hvac/hvac
# main = the release branch; devel = the active development branch
ref: ${{ matrix.hvac-gh-tag }}
fetch-depth: 0
- name: Install APT Dependencies
uses: StackStorm-Exchange/ci/.github/actions/apt-dependencies@master
with:
cache-version: v0
- name: Install Python Dependencies
uses: StackStorm-Exchange/ci/.github/actions/py-dependencies@master
with:
cache-version: v0
python-version: ${{ matrix.python-version }}
# task copied (Apache 2.0 License) from
# github.com/hvac/hvac .github/workflows/lint-and-test.yml
- name: Install Vault and Consul (for integration tests)
working-directory: pack
shell: bash
run: |
${ROOT_DIR}/tests/scripts/install_vault ${{ matrix.vault-version }} ${{ matrix.consul-version }}
- name: Setup hvac symlinks
shell: bash
env:
HVAC_DIR: ${{ github.workspace }}/hvac
run: |
# using symlinks allows us to import tests.utils.* without adding
# the rest of the hvac tests. tests.utils also uses config_files,
# so make that available too.
set -eux
for x in utils config_files; do
rm -f ${ROOT_DIR}/tests/${x}
# relative (-r) allows the symlink to work in vagrant
ln -rs ${HVAC_DIR}/tests/${x} ${ROOT_DIR}/tests/${x}
ls -ld ${ROOT_DIR}/tests/${x}
done
- name: Run pack tests
uses: StackStorm-Exchange/ci/.github/actions/test@master
with:
enable-common-libs: false
services:
mongo:
image: mongo:7.0
ports:
- 27017:27017
rabbitmq:
image: rabbitmq:3
ports:
- 5672:5672
#redis:
# image: redis
# ports:
# - 6379:6379