Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates to ci/gha #117

Closed
wants to merge 101 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
2f88083
Added build_and_test GitHub Action
lm-ydubler Nov 22, 2021
f7db1aa
build_and_test.yml: Changed pointer from StackStorm-Exchange to lm-yd…
lm-ydubler Nov 22, 2021
7c41b43
Delete
lm-ydubler Nov 22, 2021
77f79d5
checkout/action.yaml: Added a shell field (opting to use the bash shell)
lm-ydubler Nov 22, 2021
77876cc
checkout/action.yaml: Added shell field (using bash shell)
lm-ydubler Nov 22, 2021
d706ee8
checkout/action.yaml: Updated pack repository path to 'lm-ydubler/log…
lm-ydubler Nov 22, 2021
4e4e376
checkout/action.yaml: Fixing the 'pack' field
lm-ydubler Nov 22, 2021
6676404
apt-dependencies/action.yaml: Added shell field (using bash shell)
lm-ydubler Nov 22, 2021
934facf
apt-dependencies/action.yaml: Added shell field (using bash)
lm-ydubler Nov 22, 2021
baed83e
apt-dependencies/action.yaml: Removed a shell field
lm-ydubler Nov 22, 2021
51488d9
apt-dependencies/action.yaml: Added shell fields (using bash)
lm-ydubler Nov 22, 2021
b5b8c74
apt-dependencies/action.yaml: Changed 'input' to 'inputs'
lm-ydubler Nov 22, 2021
ddc7b48
apt-dependencies/action.yaml: Fixing a string concatenation error
lm-ydubler Nov 22, 2021
7ca92d3
apt-dependencies/action.yaml: Fixing string concatention error
lm-ydubler Nov 22, 2021
b3b59da
apt-dependencies/action.yaml: Fixing string concatenation error
lm-ydubler Nov 22, 2021
dc80fd2
apt-dependencies/action.yaml: Fixing string concatenation error
lm-ydubler Nov 22, 2021
39218dd
apt-dependencies/action.yaml: Fixing string concatenation error
lm-ydubler Nov 22, 2021
707907e
apt-dependencies/action.yaml: Fixed string concatenation error
lm-ydubler Nov 22, 2021
2390554
apt-dependencies/action.yaml: Fixed string concatenation error
lm-ydubler Nov 22, 2021
388292a
apt-dependencies/action.yaml: Fixed string concatenation error
lm-ydubler Nov 22, 2021
7650cd7
apt-dependencies/action.yaml: Fixed string concatenation error
lm-ydubler Nov 22, 2021
669896f
apt-dependencies/action.yaml: Fixed string concatenation error
lm-ydubler Nov 22, 2021
ba74434
apt-dependencies/action.yaml: Fixed string concatenation error
lm-ydubler Nov 22, 2021
541d492
py-dependencies/action.yaml: Changed 'input' to 'inputs'
lm-ydubler Nov 22, 2021
aececc2
py-dependencies/action.yaml: Added numerous shell fields (using bash)
lm-ydubler Nov 22, 2021
167f59c
py-dependencies/action.yaml: Added shell fields (using bash)
lm-ydubler Nov 22, 2021
d545078
py-dependencies/action.yaml: Removed 2 'shell' fields
lm-ydubler Nov 22, 2021
d85cf3e
py-dependencies/action.yaml: Trying to fix 'Set up Python' step
lm-ydubler Nov 22, 2021
3603659
py-dependencies/action.yaml: Added a 'shell' field (using bash)
lm-ydubler Nov 22, 2021
d5533e1
py-dependencies/action.yaml: Added a 'shell' field (to use bash shell)
lm-ydubler Nov 22, 2021
d0da880
Update action.yaml
lm-ydubler Nov 22, 2021
461d1e7
Update action.yaml
lm-ydubler Nov 22, 2021
0884ee6
Update action.yaml
lm-ydubler Nov 22, 2021
e0b20c3
Update action.yaml
lm-ydubler Nov 22, 2021
8f71809
test/action.yaml: Added 'shell' fields (to use bash shell) and fixed …
lm-ydubler Nov 22, 2021
bf2d673
Update action.yaml
lm-ydubler Nov 22, 2021
53aa05a
Update action.yaml
lm-ydubler Nov 22, 2021
b636b82
py-dependencies/action.yaml: Commented out a duplicate step "Create ~…
lm-ydubler Nov 22, 2021
fbc7841
py-dependencies/action.yaml: Fixed environment variable syntax
lm-ydubler Nov 22, 2021
6fea37b
py-dependencies/action.yaml: Fixed environment variable syntax
lm-ydubler Nov 22, 2021
ed3e6a4
Update action.yaml
lm-ydubler Nov 22, 2021
87cab81
Update action.yaml
lm-ydubler Nov 22, 2021
7d49de2
Update action.yaml
lm-ydubler Nov 22, 2021
59d5d3e
Update action.yaml
lm-ydubler Nov 22, 2021
88532b6
Update action.yaml
lm-ydubler Nov 22, 2021
497f9ad
Update action.yaml
lm-ydubler Nov 22, 2021
be188ee
Update action.yaml
lm-ydubler Nov 22, 2021
fb5c471
Update action.yaml
lm-ydubler Nov 22, 2021
994a33b
Update action.yaml
lm-ydubler Nov 22, 2021
6bea511
Update Makefile
lm-ydubler Nov 22, 2021
7e1012d
Update Makefile
lm-ydubler Nov 22, 2021
32816a9
Update Makefile
lm-ydubler Nov 22, 2021
5fb8468
Update Makefile
lm-ydubler Nov 22, 2021
efea9f4
Update action.yaml
lm-ydubler Nov 22, 2021
f82845c
Update Makefile
lm-ydubler Nov 22, 2021
11f75e2
Update action.yaml
lm-ydubler Nov 22, 2021
6cb9957
Update Makefile
lm-ydubler Nov 22, 2021
b8a2030
Update Makefile
lm-ydubler Nov 22, 2021
0ae640b
Update Makefile
lm-ydubler Nov 22, 2021
6d81099
Update Makefile
lm-ydubler Nov 22, 2021
edf07a4
Update Makefile
lm-ydubler Nov 22, 2021
c74aebe
Update action.yaml
lm-ydubler Nov 22, 2021
2655930
Update action.yaml
lm-ydubler Nov 22, 2021
7cb6f4b
Update action.yaml
lm-ydubler Nov 22, 2021
b75d325
Update Makefile
lm-ydubler Nov 22, 2021
c8a13bc
Update action.yaml
lm-ydubler Nov 22, 2021
1f43c02
Update action.yaml
lm-ydubler Nov 23, 2021
53b0d57
Update action.yaml
lm-ydubler Nov 23, 2021
1dd2455
Update action.yaml
lm-ydubler Nov 23, 2021
fd560d3
Update action.yaml
lm-ydubler Nov 23, 2021
54edeb2
Update action.yaml
lm-ydubler Nov 23, 2021
067efd0
Update action.yaml
lm-ydubler Nov 23, 2021
3129a27
Update action.yaml
lm-ydubler Nov 23, 2021
f6155ec
Update action.yaml
lm-ydubler Nov 23, 2021
3da2fe9
Update action.yaml
lm-ydubler Nov 23, 2021
d399d83
Update action.yaml
lm-ydubler Nov 23, 2021
37d9a6e
Update action.yaml
lm-ydubler Nov 23, 2021
f4b95cf
Update action.yaml
lm-ydubler Nov 23, 2021
71609b4
Update action.yaml
lm-ydubler Nov 23, 2021
7f45ea9
Update action.yaml
lm-ydubler Nov 23, 2021
f3ea37d
Update action.yaml
lm-ydubler Nov 23, 2021
fbb18fd
Update action.yaml
lm-ydubler Nov 23, 2021
0006f69
Update action.yaml
lm-ydubler Nov 23, 2021
acfdf94
Update action.yaml
lm-ydubler Nov 23, 2021
663ae54
Update action.yaml
lm-ydubler Nov 23, 2021
780b3ec
Update action.yaml
lm-ydubler Nov 23, 2021
e896645
Update action.yaml
lm-ydubler Nov 23, 2021
fbfa531
Update action.yaml
lm-ydubler Nov 23, 2021
87da3f7
Update action.yaml
lm-ydubler Nov 23, 2021
f8f7017
Update action.yaml
lm-ydubler Nov 23, 2021
d83a6d3
Update action.yaml
lm-ydubler Nov 23, 2021
1284a74
Update action.yaml
lm-ydubler Nov 23, 2021
b5d8087
Update action.yaml
lm-ydubler Nov 23, 2021
74d7b7d
Update action.yaml
lm-ydubler Nov 23, 2021
4f4dc42
Update action.yaml
lm-ydubler Nov 23, 2021
b340e07
Update action.yaml
lm-ydubler Nov 23, 2021
23ed462
Update action.yaml
lm-ydubler Nov 23, 2021
77cd22d
Update action.yaml
lm-ydubler Nov 23, 2021
bc32459
Update action.yaml
lm-ydubler Nov 23, 2021
f3962e6
Update action.yaml
lm-ydubler Nov 23, 2021
43f4853
Update action.yaml
lm-ydubler Nov 23, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .circle/Makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
ROOT_DIR ?= $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
NUM_CHANGED_FILES := $(shell $(CI_DIR)/utils/git-changes files | wc -w)
NUM_CHANGED_PY := $(shell $(CI_DIR)/utils/git-changes py | wc -w)
NUM_CHANGED_YAML := $(shell $(CI_DIR)/utils/git-changes yaml | wc -w)
NUM_CHANGED_JSON := $(shell $(CI_DIR)/utils/git-changes json | wc -w)
CHANGED_DIRECTORIES := $(shell $(CI_DIR)/utils/git-changes directories)
#NUM_CHANGED_PY := $(shell $(CI_DIR)/utils/git-changes py | wc -w)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If CI_DIR is not populated correctly, that is concerning. Hmm.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might have been populating correctly but possibly just had the wrong value. GHA doesn't allow string concatenation using a + so I improvised to use the format() function. So I'll look it over and make sure it all matches up knowing what the correct directory should be as a fail safe.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And just so you know, this is a testing PR and has a million commits a second. When it checks out , I'll create the final-draft PR which will have a handful of commits just so that it comes across clean.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I expected that. But having it in a PR allows for some discussion about the issues you are working on 😄

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to consolidate some of your commits and add them to the gha branch of StackStorm-Exchange/ci.

#NUM_CHANGED_YAML := $(shell $(CI_DIR)/utils/git-changes yaml | wc -w)
#NUM_CHANGED_JSON := $(shell $(CI_DIR)/utils/git-changes json | wc -w)
#CHANGED_DIRECTORIES := $(shell $(CI_DIR)/utils/git-changes directories)
NUM_CHANGED_FILES := $(shell /home/runner/work/_actions/lm-ydubler/ci/gha/utils/git-changes-files | wc -w)
NUM_CHANGED_PY := $(shell /home/runner/work/_actions/lm-ydubler/ci/gha/utils/git-changes-py | wc -w)
NUM_CHANGED_YAML := $(shell /home/runner/work/_actions/lm-ydubler/ci/gha/utils/git-changes-yaml | wc -w)
NUM_CHANGED_JSON := $(shell /home/runner/work/_actions/lm-ydubler/ci/gha/utils/git-changes-json | wc -w)
CHANGED_DIRECTORIES := $(shell /home/runner/work/_actions/lm-ydubler/ci/gha/utils/git-changes-directories)
VIRTUALENV_DIR ?= virtualenv
ST2_REPO_PATH ?= /tmp/st2
ST2_REPO_BRANCH ?= master
Expand Down Expand Up @@ -293,8 +297,8 @@ requirements-ci:
@echo "==================== requirements-ci ===================="
@echo
. $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/pip install --upgrade "pip==20.3.3"
. $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/pip install --cache-dir $(HOME)/.pip-cache -q -r $(CI_DIR)/.circle/requirements-dev.txt
. $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/pip install --cache-dir $(HOME)/.pip-cache -q -r $(CI_DIR)/.circle/requirements-pack-tests.txt
. $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/pip install --cache-dir $(HOME)/.pip-cache -q -r /home/runner/work/_actions/lm-ydubler/ci/gha/.circle/requirements-dev.txt
. $(VIRTUALENV_DIR)/bin/activate && $(VIRTUALENV_DIR)/bin/pip install --cache-dir $(HOME)/.pip-cache -q -r /home/runner/work/_actions/lm-ydubler/ci/gha/.circle/requirements-pack-tests.txt

.PHONY: virtualenv
virtualenv: $(VIRTUALENV_DIR)/bin/activate
Expand Down
12 changes: 8 additions & 4 deletions gha/apt-dependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ runs:

- name: Create a directory for debian packages so we can cache it
# this is what we did on CircleCI. Not sure if it'll work on GHA
shell: bash
run: >
sudo rm -rf /var/cache/apt/archives
&& sudo ln -s ~/apt_cache /var/cache/apt/archives
Expand All @@ -29,22 +30,25 @@ runs:
with:
path: |
~/apt_cache
key: ${{ runner.os }}-apt-${{ input.cache-version }}-${{ hashFiles(github.action_path + '/apt-packages.txt') }}
key: ${{ runner.os }}-apt-${{ inputs.cache-version }}-${{ hashFiles(format('{0}{1}', github.action_path, '/apt-packages.txt')) }}
restore-keys: |
${{ runner.os }}-apt-${{ input.cache-version }}-
${{ runner.os }}-apt-${{ inputs.cache-version }}-

- name: Install APT Dependencies
shell: bash
env:
CACHE_HIT: ${{steps.cache-apt-deps.outputs.cache-hit}}
APT_PACKAGES_FILE_PATH: ${{github.action_path + '/apt-packages.txt'}}
APT_PACKAGES_FILE_PATH: ${{ format('{0}{1}', github.action_path, '/apt-packages.txt') }}
run: |
if [[ "$CACHE_HIT" != 'true' ]]; then
if [[ "${CACHE_HIT}" != 'true' ]]; then
sudo apt-get -y update
fi
APT_PACKAGES=$(grep -v '^#' "${APT_PACKAGES_FILE_PATH}" | xargs echo -n)
echo APT_PACKAGES_FILE_PATH=${APT_PACKAGES_FILE_PATH}
sudo apt-get -y install ${APT_PACKAGES}

- name: Print versions
shell: bash
run: |
set -ex
jq --version
Expand Down
8 changes: 5 additions & 3 deletions gha/checkout/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ runs:
using: "composite"
steps:
- name: Configure git user
shell: bash
env:
GIT_USER_NAME: "${{ inputs.git_user_name }}"
GIT_USER_EMAIL: "${{ inputs.git_user_email }}"
Expand All @@ -32,8 +33,9 @@ runs:

- name: Checkout pack repo
uses: actions/checkout@v2
with:
path: pack
depth: 1
fetch-depth: 1

- name: Checkout st2 repo
# so other scripts can reference StackStorm Python code
Expand All @@ -42,12 +44,12 @@ runs:
repository: StackStorm/st2
ref: ${{ inputs.st2_branch }}
path: st2
depth: 1
fetch-depth: 1

- name: Checkout lint-configs repo
uses: actions/checkout@v2
with:
repository: StackStorm/lint-configs
ref: ${{ inputs.lint_configs_branch }}
path: lint-configs
depth: 1
fetch-depth: 1
39 changes: 24 additions & 15 deletions gha/py-dependencies/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@ description: |
StackStorm-Exchange/ci/gha/apt-dependencies.
author: StackStorm


inputs:
python-version:
required: true
description: Which python version we should install
default: "3.6"
cache-version:
required: false
default: "v0"
Expand All @@ -24,28 +26,30 @@ runs:
using: "composite"
steps:

- name: 'Set up Python (${{ input.python-version }})'
- name: 'Set up Python (${{ inputs.python-version }})'
uses: actions/setup-python@v2
with:
python-version: '${{ input.python-version }}'
python-version: '${{ inputs.python-version }}'

- name: Cache Python Dependencies
uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/virtualenv
key: ${{ runner.os }}-python-${{ input.python-version }}-${{ input.cache-version }}-${{ hashFiles('requirements.txt') }}
key: ${{ runner.os }}-python-${{ inputs.python-version }}-${{ inputs.cache-version }}-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-python-${{ input.python-version }}-${{ input.cache-version }}-
${{ runner.os }}-python-${{ inputs.python-version }}-${{ inputs.cache-version }}-

- name: Install virtualenv
# this should run in the st2 checkout
working-directory: st2
run: |
./scripts/github/install-virtualenv.sh
# - name: Install virtualenv
# shell: bash
# # this should run in the st2 checkout
# working-directory: st2
# run: |
# ./scripts/github/install-virtualenv.sh

- name: Create ~/virtualenv
shell: bash
id: virtualenv
# this should run in the st2 checkout
working-directory: st2
Expand All @@ -55,27 +59,31 @@ runs:
./scripts/github/install-virtualenv.sh
PIP_VERSION=$(grep '^PIP_VERSION' Makefile | awk '{print $3}')
echo "::set-output name=pip-version::${PIP_VERSION}"
${VIRTUALENV_DIR}/bin/pip install -U "pip==${PIP_VERSION}" setuptools
${{env.VIRTUALENV_DIR}}/bin/pip install -U "pip==${PIP_VERSION}" setuptools
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ${{ }} vs ${ } bits are more problematic here. If VIRTUALENV_DIR is not available here, then install-virtualenv.sh might not work correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just for reference:
single-vs-double


- name: Install StackStorm requirements
# this should run in the st2 checkout
shell: bash
working-directory: st2
env:
VIRTUALENV_DIR: "~/virtualenv"
Copy link
Member

@cognifloyd cognifloyd Nov 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Since tilde expansion isn't happening like I thought, so maybe we can do this instead:

Suggested change
VIRTUALENV_DIR: "~/virtualenv"
VIRTUALENV_DIR: ${{ env.HOME }}/virtualenv

To do that, we need to add a step at the beginning of the job like this:

- name: add HOME to env context
  shell: bash
  run: echo ::set-env name=HOME::$HOME

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just pushed this into change to the upstream gha branch.

run: |
${VIRTUALENV_DIR}/bin/pip install -r requirements.txt
${{env.VIRTUALENV_DIR}}/bin/pip install -r requirements.txt

- name: Install runners
shell: bash
env:
VIRTUALENV_DIR: "~/virtualenv"
ACTION_PATH: ${{ github.action_path }}
ST2_REPO_PATH: st2
CI_DIR: ${{ format('{0}{1}', github.action_path, '/../..') }}
# TODO: This Makefile has CircleCI assumptions
run: |
cp ${ACTION_PATH}/../../.circle/Makefile .
cp ${{env.ACTION_PATH}}/../../.circle/Makefile .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out, github already exposes action_path as an env var, so we can remove ACTION_PATH from the env block and just use $GITHUB_ACTION_PATH

Suggested change
cp ${{env.ACTION_PATH}}/../../.circle/Makefile .
cp ${GITHUB_ACTION_PATH}/../../.circle/Makefile .

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just pushed this to the upstream gha branch

make requirements-ci .install-runners

- name: Install pack requirements
shell: bash
working-directory: pack
env:
VIRTUALENV_DIR: "~/virtualenv"
Expand All @@ -84,19 +92,20 @@ runs:
run: |
if [[ -f "${PACK_REQUIREMENTS_FILE}" ]]; then
echo "Installing pack requirements from ${PACK_REQUIREMENTS_FILE}"
${VIRTUALENV_DIR}/bin/pip install -r "${PACK_REQUIREMENTS_FILE}"
${{env.VIRTUALENV_DIR}}/bin/pip install -r "${PACK_REQUIREMENTS_FILE}"
fi
if [[ -f "${PACK_TESTS_REQUIREMENTS_FILE}" ]]; then
echo "Installing pack tests requirements from ${PACK_TESTS_REQUIREMENTS_FILE}"
${VIRTUALENV_DIR}/bin/pip install -r "${PACK_TESTS_REQUIREMENTS_FILE}"
${{env.VIRTUALENV_DIR}}/bin/pip install -r "${PACK_TESTS_REQUIREMENTS_FILE}"
fi

- name: Print versions
shell: bash
env:
VIRTUALENV_DIR: "~/virtualenv"
run: |
set -ex
source ${VIRTUALENV_DIR}/activate
source ${{env.VIRTUALENV_DIR}}/bin/activate
python3 --version
pip --version
virtualenv --version
36 changes: 30 additions & 6 deletions gha/test/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,27 +24,51 @@ runs:
using: "composite"
steps:

# - name: Get Pack Name (original)
# shell: bash
# id: pack-name
# env:
# VIRTUALENV_DIR: "~/virtualenv"
# ACTION_PATH: ${{ github.action_path }}
# run: |
# env
# export PACK_NAME=$(${{env.VIRTUALENV_DIR}}/bin/python ${ACTION_PATH}/../../.circle/validate.py "${GITHUB_REPOSITORY##*/}" pack.yaml)
# if [[ -z "${PACK_NAME}" ]]; then
# echo "Unable to retrieve pack name."
# exit 1
# fi
# echo "::set-output name=pack-name::${PACK_NAME}"

- name: Get Pack Name
shell: bash
id: pack-name
env:
VIRTUALENV_DIR: "~/virtualenv"
ACTION_PATH: ${{ github.action_path }}
run: |
export PACK_NAME=$(${VIRTUALENV_DIR}/bin/python ${ACTION_PATH}/../../.circle/validate.py "${GITHUB_REPOSITORY##*/}" pack.yaml)
echo -e '\n\n/home/runner/work/logicmonitor-stackstorm-pack/ \n\n'
ls /home/runner/work/logicmonitor-stackstorm-pack/
echo -e '\n\n/home/runner/work/lm-ydubler/logicmonitor-stackstorm-pack \n\n'
ls /home/runner/work/logicmonitor-stackstorm-pack/logicmonitor-stackstorm-pack/
echo -e '\n\n/home/runner/work/logicmonitor-stackstorm-pack/logicmonitor-stackstorm-pack/pack/ \n\n'
ls /home/runner/work/logicmonitor-stackstorm-pack/logicmonitor-stackstorm-pack/pack/
echo -e '\n\n'
export PACK_NAME=$(${{env.VIRTUALENV_DIR}}/bin/python ${ACTION_PATH}/../../.circle/validate.py "lm-ydubler/logicmonitor-stackstorm-pack" "/home/runner/work/logicmonitor-stackstorm-pack/logicmonitor-stackstorm-pack/pack/pack.yaml")
if [[ -z "${PACK_NAME}" ]]; then
echo "Unable to retrieve pack name."
exit 1
fi
echo "::set-output name=pack-name::${PACK_NAME}"

- name:
- name: Unsure
shell: bash
env:
VIRTUALENV_DIR: "~/virtualenv"
FORCE_CHECK_ALL_FILES: true if on default branch
ROOT_DIR: pack directory
CI_DIR: ${{ github.action_path + "/../.." }}
ROOT_DIR: "/home/runner/work/logicmonitor-stackstorm-pack/logicmonitor-stackstorm-pack/"
CI_DIR: ${{ format('{0}{1}', github.action_path, '/../..') }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is where CI_DIR is populated - I kind of guessed on the relative path though, so feel free to adjust this if it's not right.

ST2_REPO_PATH: st2 directory
ENABLE_COMMON_LIBS: ${{ input.enable-common-libs }}
ENABLE_COMMON_LIBS: ${{ inputs.enable-common-libs }}
# TODO: This Makefile has CircleCI assumptions
run: |
if [[ "true" == "${ENABLE_COMMON_LIBS}" ]]; then
Expand All @@ -54,6 +78,6 @@ runs:
export ST2_CONFIG_FILE=${CI_DIR}/conf/st2.tests.conf
fi
cp ${CI_DIR}/.circle/Makefile .
make -C "${ROOT_DIR}" all-ci
make -C "${{env.ROOT_DIR}}" all-ci